Presence detection using mobile agents in peer-to-peer networks

ABSTRACT

Embodiments of a system and method for using mobile agents in peer-to-peer networks to gather presence information for determining active peers in groups of peers. In one embodiment, a mobile agent may be launched by an initiating peer in a peer group to attempt to visit each member peer in a peer group. The itinerary of the mobile agent may include information for accessing each member peer of the peer group. The mobile agent may return to its initiating peer with a payload indicating which of the member peers it was successful in contacting and visiting. When the mobile agent returns to the originating peer, the originating peer may update presence information indicating presence of member peer nodes in the group in accordance with the indications provided by the mobile agent.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to computer networks, and moreparticularly to implementing mobile agents in peer-to-peer networks.

2. Description of the Related Art

The Internet has three valuable fundamental assets—information,bandwidth, and computing resources—all of which are vastlyunderutilized, partly due to the traditional client-server computingmodel. No single search engine or portal can locate and catalog theever-increasing amount of information on the Web in a timely way.Moreover, a huge amount of information is transient and not subject tocapture by techniques such as Web crawling. For example, research hasestimated that the world produces two exabytes or about 2×10¹⁸ bytes ofinformation every year, but only publishes about 300 terabytes or about3×10¹² bytes. In other words, for every megabyte of informationproduced, only one byte is published. Moreover, Google claims that itsearches about only 1.3×10^₈ web pages. Thus, finding useful informationin real time is increasingly difficult.

Although miles of new fiber have been installed, the new bandwidth getslittle use if everyone goes to one site for content and to another sitefor auctions. Instead, hot spots just get hotter while cold pipes remaincold. This is partly why most people still feel the congestion over theInternet while a single fiber's bandwidth has increased by a factor of10^6 since 1975, doubling every 16 months.

New processors and storage devices continue to break records in speedand capacity, supporting more powerful end devices throughout thenetwork. However, computation continues to accumulate around datacenters, which have to increase their workloads at a crippling pace,thus putting immense pressure on space and power consumption.

Finally, computer users in general are accustomed to computer systemsthat are deterministic and synchronous in nature, and think of such astructure as the norm. For example, when a browser issues a URL (UniformResource Locator) request for a Web page, the output is typicallyexpected to appear shortly afterwards. It is also typically expectedthat everyone around the world will be able to retrieve the same pagefrom the same Web server using the same URL.

The term peer-to-peer networking or computing (often referred to as P2P)may be applied to a wide range of technologies that greatly increase theutilization of information, bandwidth, and computing resources in theInternet. Frequently, these peer-to-peer technologies adopt anetwork-based computing style that neither excludes nor inherentlydepends on centralized control points. Apart from improving theperformance of information discovery, content delivery, and informationprocessing, such a style also can enhance the overall reliability andfault-tolerance of computing systems.

FIGS. 1A and 1B are examples illustrating the peer-to-peer model. FIG.1A shows two peer devices 104A and 104B that are currently connected.Either of the two peer devices 104 may serve as a client of or a serverto the other device. FIG. 1B shows several peer devices 104 connectedover the network 106 in a peer group. In the peer group, any of the peerdevices 104 may serve as a client of or a server to any of the otherdevices.

SUMMARY OF THE INVENTION

Embodiments of a system and method for using mobile agents inpeer-to-peer networks to gather presence information for determiningactive peers in groups of peers are described. In one embodiment, amobile agent may be launched by an initiating peer in a peer group (e.g.at varying or periodic intervals) to attempt to visit each member peerin a peer group. The itinerary of the mobile agent may includeinformation for accessing each member peer of the peer group (e.g. anadvertisement for a mobile agent input pipe for each of the memberpeers). The mobile agent may return to its initiating peer with apayload indicating which of the member peers it was successful incontacting and visiting (or alternatively indicating which of the memberpeers it was unsuccessful in contacting and visiting).

In one embodiment, the peer group may be implemented in a peer-to-peernetwork implemented according to a peer-to-peer platform which includesone or more peer-to-peer platform protocols for enabling the peer nodesto discover each other, communicate with each other, join peer groups,and send and receive mobile agents in the peer-to-peer environment. Inone embodiment, pipes implemented according to the peer-to-peer platformmay be used to send the mobile agent between peer nodes on theitinerary. In one embodiment, each peer in a peer group may advertise aninput pipe for receiving incoming mobile agents, e.g. when a particularmodule (e.g. service, application, etc.) is active. A peer may generateand launch a mobile agent to detect peer group member presence. Themobile agent may include an itinerary of advertised pipes for memberpeers. The mobile agent may travel to each member peer in its itinerary,and return to the originating peer when done. The originating peer maythen access the mobile agent's payload to determine current peer grouppresence at the time of the mobile agent's visit(s). In one embodiment,mobile agents may be used by modules (e.g. services, applications, etc.)to detect peer group presence of other instances of the module in thepeer group.

When a presence mobile agent arrives at a peer on its itinerary, thepeer may update the return payload, and then may attempt to contact anext peer on the itinerary. In one embodiment, the peer may acquire thepipe advertisement from the itinerary (or alternatively acquire the pipeadvertisement from elsewhere using information in the itinerary). If thepipe advertisement is acquired, the peer may attempt to open theadvertised pipe. If successfully opened, the peer may attempt to send amessage with appropriately updated “To”, “Itinerary”, and “Returnpayload” fields to the input pipe specified by the advertisement. If theabove is successful, the mobile agent arrives at the next itinerary hop.If failure occurs at any point, then the next “hop” on the itinerary maybe selected and the above repeated until the mobile agent successfullyreaches a “hop” on the itinerary or is returned to the originating peerif no “hops” are reached.

When the mobile agent returns to the originating peer, the originatingpeer may update presence information indicating presence of member peernodes in the group in accordance with the indications provided by themobile agent. In one embodiment, the peer may subsequently launch themobile agent with an itinerary indicating member peer nodes indicated aspresent in the peer group as indicated by the updated presenceinformation. In one embodiment, the peer may provide the presenceinformation to other member peer nodes in the group. In one embodiment,the peer may launch mobile agents including itineraries of member peernodes in other groups of peers in which the peer is a member to updatepresence information for the other peer groups.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates a prior art example of two devices that arecurrently connected as peers;

FIG. 1B illustrates a prior art example of several peer devicesconnected over the network in a peer group;

FIG. 2 illustrates one embodiment of peer-to-peer platform softwarearchitecture at the conceptual level;

FIG. 3 illustrates an exemplary content identifier according to oneembodiment;

FIG. 4 illustrates a point-to-point pipe connection between peersaccording to one embodiment;

FIG. 5 illustrates a peer-to-peer platform message format according toone embodiment;

FIG. 6 illustrates the content of a peer advertisement according to oneembodiment;

FIG. 7 illustrates the content of a peer group advertisement accordingto one embodiment;

FIG. 8 illustrates the content of a pipe advertisement according to oneembodiment;

FIG. 9 illustrates the content of a service advertisement according toone embodiment;

FIG. 10 illustrates the content of a content advertisement according toone embodiment;

FIG. 11 illustrates the content of an endpoint advertisement accordingto one embodiment;

FIG. 12 illustrates protocols and bindings in a peer-to-peer platformaccording to one embodiment;

FIG. 13 illustrates discovery through a rendezvous proxy according toone embodiment;

FIG. 14 illustrates discovery through propagate proxies according to oneembodiment;

FIG. 15 illustrates using messages to discover advertisements accordingto one embodiment;

FIG. 16 illustrates one embodiment of using peer resolver protocolmessages between a requesting peer and a responding peer;

FIG. 17 illustrates one embodiment of using peer information protocolmessages between a requesting peer and a responding peer;

FIG. 18 illustrates several core components and how they interact fordiscovery and routing according to one embodiment;

FIG. 19 illustrates one embodiment of message routing in a peer-to-peernetwork that uses the peer-to-peer platform;

FIG. 20 illustrates traversing a firewall in a virtual private networkwhen access is initiated from outside only according to one embodiment;

FIG. 21 illustrates email exchange through an email gateway according toone embodiment;

FIG. 22 illustrates traversing a firewall when access is initiated fromthe inside according to one embodiment;

FIG. 23 illustrates embodiments of a peer-to-peer platform proxyservice, and shows various aspects of the operation of the proxyservice;

FIG. 24 illustrates a method of using a proxy service for peer groupregistration according to one embodiment;

FIG. 25 illustrates peer group registration across a firewall accordingto one embodiment;

FIG. 26 illustrates a method of providing peer group membership througha proxy service according to one embodiment;

FIGS. 27A and 27B illustrate a method of providing privacy in thepeer-to-peer platform according to one embodiment;

FIGS. 28A and 28B illustrate one embodiment of a method for using apeer-to-peer platform proxy service as a certificate authority;

FIG. 29A illustrates a peer in a peer-to-peer network publishing anadvertisement according to one embodiment;

FIG. 29B illustrates a peer in a peer-to-peer network publishing anadvertisement to a rendezvous peer according to one embodiment;

FIG. 30 illustrates discovering advertisements according to oneembodiment;

FIG. 31 illustrates a tiered architecture for abstracting softwaremodules according to one embodiment;

FIG. 32 illustrates a tiered architecture for abstracting softwaremodules according to another embodiment;

FIG. 33 illustrates a module class advertisement, a module specificationadvertisement, and a module implementation advertisement for a softwaremodule according to one embodiment;

FIG. 34 illustrates a computing device configured to handle a mobileagent according one embodiment;

FIG. 35 illustrates peers in a peer-to-peer network using a mobile agentaccording to one embodiment;

FIG. 36 illustrates a pipe used by a mobile agent in a peer-to-peerenvironment implemented according to the exemplary peer-to-peerplatform;

FIG. 37 illustrates a mobile agent according to one embodiment;

FIG. 38 illustrates a peer creating a mobile agent itinerary accordingto one embodiment;

FIG. 39 illustrates a peer generating and using a mobile agent accordingto one embodiment;

FIG. 40 illustrates a peer receiving and processing a mobile agentaccording to one embodiment; and

FIG. 41 illustrates a mobile agent operating from peer to peer in apeer-to-peer network according to one embodiment;

FIG. 42 illustrates a member peer in a peer group using a mobile agentto detect peer group member presence according to one embodiment;

FIG. 43 is a flowchart illustrating detecting presence in a peer groupusing a mobile agent according to one embodiment;

FIG. 44 is a flowchart illustrating collaborative content control in apeer group using a mobile agent according to one embodiment;

FIG. 45 illustrates a host peer operating in response to a mobile agentconfigured to perform version control according to one embodiment;

FIG. 46 is a flowchart illustrating using a mobile agent to detectunauthorized copies of content according to one embodiment;

FIG. 47 illustrates a host peer operating in response to a digitalrights management mobile agent according to one embodiment;

FIG. 48 is a flowchart illustrating a peer node using a mobile agent tocollect trust evaluations from a plurality of peer nodes according toone embodiment;

FIG. 49 illustrates a host peer operating in response to a mobile agentconfigured to gather reputation information according to one embodiment;

FIG. 50A illustrates trust relationships between peers and between peersand codat according to one embodiment;

FIG. 50B illustrates peers in a “web of trust” according to oneembodiment;

FIG. 51 illustrates a typical computer system that is suitable forimplementing various embodiments of the decentralized trust mechanism;

FIG. 52 illustrates an exemplary architecture of a peer implementing atrust mechanism according to one embodiment;

FIG. 53A illustrates a codat confidence table according to oneembodiment;

FIG. 53B illustrates a peer confidence table according to oneembodiment;

FIG. 53C illustrates a peer group-independent peer confidence tableaccording to one embodiment;

FIG. 54 illustrates one embodiment of a table of trust values withcorresponding significances or meanings;

FIG. 55 illustrates a trust spectrum according to one embodiment;

FIG. 56A illustrates a certificate confidence table according to oneembodiment; and

FIG. 56B illustrates a certificate confidence table comprisingconfidences in using a given peer's certificate for securing atransaction and confidences in the peer as a recommender, or certificatecosigner.

While the invention is described herein by way of example for severalembodiments and illustrative drawings, those skilled in the art willrecognize that the invention is not limited to the embodiments ordrawings described. It should be understood, that the drawings anddetailed description thereto are not intended to limit the invention tothe particular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention as defined by the appendedclaims. The headings used herein are for organizational purposes onlyand are not meant to be used to limit the scope of the description orthe claims. As used throughout this application, the word “may” is usedin a permissive sense (i.e., meaning having the potential to), ratherthan the mandatory sense (i.e., meaning must). Similarly, the words“include”, “including”, and “includes” mean including, but not limitedto.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Embodiments of a system and method for implementing mobile agents inpeer-to-peer (P2P) networking environments are described. A mobile agentmay be software configured to operate on different nodes in a networkand gather information or perform some service on host nodes in thenetwork for a program, system, or user. For example, a mobile agent maybe created on one node in a network, start executing on that node, betransferred to another node, and continue executing on that other node.A mobile agent may be configured to perform one or more operations onnetwork nodes hosting the mobile agent. A mobile agent may be configuredto navigate through the network from node to node according to anitinerary.

FIG. 34 illustrates a device 1300 (also referred to herein as a node)including a processor 1301, memory 1302 coupled to the processor 1301,and one or more network connections 1303, for participating as a peernode in a peer-to-peer network according to one embodiment. The networkconnection(s) may be according to any specification enabling thecomputing device 1300 to exchange data in a network, including, but notlimited to: wired and wireless connections, Ethernet, Universal SerialBus (USB), serial, and parallel connections. Memory 1302 may include animplementation of a peer 200. In one embodiment, peer 200 may beimplemented according to a peer-to-peer platform. An exemplarypeer-to-peer platform for implementing a peer-to-peer network includingpeers such as peer 200 and groups of peers in which mobile agents asdescribed herein may be implemented is described later in this document.

Peer 200 may be implemented as one or more software modules or as partof a program, application, or operating system. In one embodiment, atleast part of the peer 200 may be implemented in hardware. In oneembodiment, peer 200 may include data corresponding to other peersaccessible through the network connection 1303 that may form part of atleast one peer group with peer 200. In one embodiment, peer 200 mayinclude information regarding communications channels (e.g. pipes asdescribed for the exemplary peer-to-peer platform described below) forconnecting peer 200 to other peers. Peer 200 may also include datacorresponding to other resources in the network accessible throughnetwork connection 1303, such as services and data available from otherpeers. In one embodiment, memory 1302 may include data corresponding toother nodes reachable through network connection 1303 that are not peernodes.

In one embodiment, a peer 200 may include a mobile agent handler 1402for initiating mobile agents and handling received mobile agents. In oneembodiment, the mobile agent handler 1402 may be implemented accordingto a peer-to-peer platform such as the exemplary peer-to-peer platformdescribed below. The mobile agent handler 1402 may enable peer 200 touse mobile agents among the services, programs, or tools available tofunction within or interact with the peer-to-peer network. Mobile agenthandler 1402 may be implemented in any of a variety of ways including,but not limited to, as a software module (e.g. a service orapplication), a demon, and a daemon. While mobile agent handler 1402 isillustrated as part of peer 200, in other embodiments mobile agenthandler 1402 may be a stand-alone program or other software module inmemory 1302 separate from peer 200, or alternatively may be implementedon a different device and/or peer and accessed by peer 200 via thenetwork.

FIG. 35 illustrates peers in a peer-to-peer network using a mobile agentaccording to one embodiment. An initiating peer 200A may generate amobile agent 1400 to perform one or more tasks on and/or to gatherinformation from other peers 200 in the peer-to-peer network. In oneembodiment, peers 200 may include mobile agent handlers 1402 forinitiating mobile agents 1400 and handling received mobile agents 1400.Mobile agent 1400 may include an itinerary of one or more peers 200which the mobile agent is to attempt to visit in the peer-to-peernetwork. In one embodiment, mobile agent 1400 may be transmitted oncommunications channels in the peer-to-peer network from the initiatingpeer 200A to a first peer 200 in the itinerary, from the first peer to asecond peer, and so on, in the order the peers 200 are scheduled to bevisited in the itinerary, until the mobile agent returns to theinitiating peer 200A after visiting, or at least attempting to visit,each peer of the itinerary.

A mobile agent 1400 may be transmitted as data using a virtualcommunication channel, such as a pipe implemented according to theexemplary peer-to-peer platform described below. The mobile agent 1400may be transmitted as part of a message or generally in a formataccording to one or more data transmission protocols of the peer-to-peernetwork. The mobile agent 1400 may be transmitted in multiple parts andthe transmission may be performed through multiple routes. In oneembodiment, an initiating peer 200A may use a plurality of communicationchannels or pipes. Duplicate parts may be transmitted to provideredundancy and to avoid losing parts of the mobile agent. In oneembodiment, any communications between peers 200 may be duplicative, inone or more parts, and/or along different paths to provide redundancy.

In FIG. 35, mobile agent 1400 is shown visiting peer 200B, then 200D,and finally returning to initiating peer 200A when all peers 200 on theitinerary are visited. Peers 200C and 200E are not on the itinerary, andthus are not visited by mobile agent 1400. In one embodiment, mobileagent 1400 may not return to the initiating peer, but may terminate atthe last peer (e.g. peer 200D) in the itinerary. In one embodiment,mobile agent 1400 may return to the initiating peer 200A one or moretimes on its itinerary. In one embodiment, a peer 200 may be visitedmore than once on mobile agent 1400's itinerary. In one embodiment, ifthe initiating peer 200A is not accessible upon completing theitinerary, the mobile agent 1400 may wait on another peer 200 for theinitiating peer 200A to become available. In one embodiment, if a peer200 on the itinerary is not accessible when the mobile agent 1400attempts to visit the peer, the mobile agent 1400 may skip the peer andattempt to visit a next peer 200 on the itinerary. In one embodiment,the mobile agent 1400 may attempt to visit a skipped peer 200 later inits itinerary.

On each visited peer 200, mobile agent 1400 may perform or cause to beperformed one or more tasks such as executing one or more softwaremodules (applications, services, etc.), executing a script, collectinginformation from the visited peer 200 to be returned to the initiatingpeer 200A, or any other computer-performable task or combination oftasks which the mobile agent is configured to perform or initiate onvisited peers 200. In one embodiment, mobile agent 1400 may storeinformation it gathers from visited peers and delivers the informationto the initiating peer 200A when it returns after completing theitinerary. In one embodiment, information collected by the mobile agent1400 may be returned to the initiating peer 200A one or more times fromvisited peers 200 on the itinerary.

Continuing with FIG. 35, in one embodiment, mobile agent handlers 1402may be implemented as services in a peer-to-peer network implementedwith one or more of the peer-to-peer platform protocols of the exemplarypeer-to-peer platform described below. The peer-to-peer platformprotocols may provide a framework for dealing with the complexity anddynamic nature of peer-to-peer networks, where one cannot depend on aparticular peer to be available at a given moment in time. In thisembodiment, mobile agents 1400 may use the peer-to-peer platformprotocols, including the pipe protocol, as the basis for the mobileagents' itineraries to hide the complexity of the peer-to-peer networkfrom various modules (e.g. services, applications, etc.) that may usemobile agents 1400.

As described above, in one embodiment, mobile agents 1400 may be used inpeer-to-peer networks implemented according to the exemplarypeer-to-peer platform described below. In this embodiment, pipes asdescribed for the exemplary peer-to-peer platform may be used ascommunications channels, and the itinerary may include advertisementsfor pipes corresponding to the peers 200 to be visited on the itinerary.FIG. 36 illustrates a pipe used by a mobile agent in a peer-to-peerenvironment implemented according to the exemplary peer-to-peerplatform. When mobile agent 1400 is to visit a peer 200B on theitinerary, a pipe advertisement 808 (e.g. pipe advertisement 808A)corresponding to the peer 200B in its itinerary may be used to establisha “virtual” communications channel (a pipe), as described for theexemplary peer-to-peer platform, on the peer-to-peer network from thepeer 200A on which the mobile agent 1400 currently resides to the peer200B to be next visited. In one embodiment, the mobile agent 1400 mayinclude the pipe advertisement 808. In another embodiment, the mobileagent 1400 may include information identifying the pipe advertisement808 that may be used to access the pipe advertisement. In oneembodiment, this information may include a pipe identifier for the pipe(e.g. a URI, URN or UUID as described for the exemplary peer-to-peerplatform described below). The mobile agent 1400 may then be transmittedto the peer 200B via the pipe. Transmitting the mobile agent 1400 may beperformed from an output pipe 204 of the peer 200A to an input pipe 202of peer 200B indicated in the advertisement 808A, as described forembodiments of the exemplary peer-to-peer platform.

In one embodiment, peers 200 may generate mobile agent input pipes 202for use by mobile agents. When a peer 200 such as peer 200B of FIG. 36generates a mobile agent input pipe 202, the mobile agent input pipe maybe advertised as described below for the exemplary-peer-to-peer platformprotocols, and thus may be available for any mobile agent 1400 that maydesire to visit the associated peer 200. In one embodiment, when theinput pipe 202 is active, the input pipe may be associated with aprocess (e.g. daemon) running on the associated peer 200 which willreceive peer-to-peer platform message(s) with an itinerary and mobileagent as elements. In one embodiment, an initiating mobile agent handler1402 may generate a list of mobile agent input pipes 202 as an initialitinerary for a generated mobile agent 1400 by performing a search (e.g.discovery) in the peer-to-peer platform advertisement space for inputpipes belonging to the module (e.g. service or application) for whichthe mobile agent is targeted.

The mobile agent 1400 may then be launched as one or more peer-to-peerplatform messages including the mobile agent 1400 and the itinerary1420. The one or more peer-to-peer platform messages may then move frompipe to pipe (i.e. from peer to peer) in the itinerary until theitinerary is exhausted, and then return to the initiating peer 200, ifpossible. In one embodiment, unavailable peers 200 may be skipped, oralternatively may be visited later in the itinerary if they becomeavailable. If an input pipe 202 in the itinerary is not “listening” whenthe mobile agent attempts to access it, then the mobile agent maypostpone the visit and try another input pipe in the itinerary. If noinput pipes 202 are listening, the mobile agent may wait on a particularpeer or alternatively migrate to a peer-to-peer platform relay peer asdescribed below, and wait for a peer on the itinerary to become active(i.e. for the input pipe of the peer to start “listening”). In oneembodiment, the mobile agent may include a “timeout” period for which itwill wait for a peer or peer to become active before giving up andreturning to the initiating peer.

In one embodiment, the mobile agent may generate a payload that may beincluded in the peer-to-peer platform message(s) including the mobileagent and itinerary being passed from peer to peer. When the mobileagent returns to the initiating peer, the payload may be extracted fromthe message(s) and used by the module (e.g. service, application, etc.)associated with this mobile agent.

FIG. 37 illustrates a mobile agent 1400 according to one embodiment thatmay be generated by a peer for use in a peer-to-peer network. In oneembodiment, a mobile agent 1400 may include one or more functions 1410and an itinerary 1420 for performing one or more tasks on peers in thepeer-to-peer network as specified in the itinerary 1420. In oneembodiment, a mobile agent 1400 may include a payload 1431 that may beused to store results from the operation of the mobile agent 1400. Inone embodiment, a mobile agent 1400 may include a certificate 1432 orother data that may be used in identification, authentication and/orauthorization of the mobile agent 1400. Embodiments of mobile agents1400 may include other data as may be desired or necessary for theoperation(s) of the mobile agents 1400. Data stored in a mobile agentmay be of variable size, for example growing as the mobile agent 1400gathers more results to store as its payload 1431. Other components of amobile agent 1400 may also change size during the life cycle andoperations of the mobile agent 1400. The payload 1431 may be accessibleto the peer 200, its applications, programs, services, modules, users,hardware, or other computing elements.

In one embodiment, a mobile agent handler may generate the mobile agent1400 for the initiating peer. The mobile agent handler may be on thesame node as the initiating peer, or alternatively may be on a differentnode. In one embodiment, a peer may function as a mobile agent handler.

Components of a mobile agent 1400 may be selected and configured togenerate a mobile agent 1400 for performing one or more tasks within thepeer-to-peer network. For example, an initiating mobile agent handlermay select and organize an itinerary 1420. The itinerary 1420 mayinclude data indicating network resources such as peer-to-peercommunications channels (e.g. advertisements for pipes as described forthe exemplary peer-to-peer platform described below), peers, and/orother network resources for navigating a peer-to-peer network, asindicated at 1421A-C, which the mobile agent may use or to attempt toreach during operation. For example, the mobile agent 1400 may beimplemented in a peer-to-peer network implemented in accordance with theexemplary peer-to-peer platform described below, and the itinerary datamay include references (e.g. advertisements) to pipes 1−n, as indicatedat 1421A-C, where n is a positive integer. The itinerary data 1421 maybe ordered or formatted according to a structure indicating how a mobileagent may navigate from peer to peer.

The initiating mobile agent handler may also configure function 1410 toindicate operations to occur on hosts of the mobile agent. Some or allof the operations may be performed on host peers in the peer-to-peernetwork depending on certain conditions or parameters of the mobileagent and/or host peer. For example, function 1410 may determine how themobile agent may use or follow the itinerary 1420 or what operations maybe performed on peers the mobile agent reaches. Peers may include orfunction as mobile agent handlers for the mobile agent. Function 1410may be configured to perform one or more tasks on peers on the mobileagent's itinerary. Function 1410 may enable a mobile agent to operatewith at least limited autonomy from its initiating mobile agent handlerand/or mobile agent handlers of peers on the mobile agent's itinerary.Function 1410 may be a program, a script, or other element that isexecutable or otherwise produces computation on host peers. For example,a mobile agent may include a script, and a host peer's mobile agenthandler may perform computation corresponding to the script.Alternatively, a mobile agent may include executable code, and a hostpeer's mobile agent handler may enable that code to execute.

In one embodiment, function 1410 may include executable code that may beexecuted on one or more host peers to perform operations as configuredby its initiating mobile agent handler. For example, function 1410 mayrun as a program or application on a host peer. In one embodiment, ahost peer's mobile agent handler may access the mobile agent and executeoperations corresponding to function 1410 without treating the mobileagent 1400 or function 1410 as a program or application. For example,function 1410 may be a script, which the host mobile agent handler mayfollow to perform computation and return data. In one embodiment,computational control remains with the host peer's mobile agent handler,so that the host peer's mobile agent handler may terminate anycomputation related to a mobile agent that the peer hosts. In oneembodiment, operations of a mobile agent may be performed in one or moreof a plurality of ways, and an operating system or other system of thehost peer may select a computational framework for the mobile agent,such as a virtual machine or a program space, which may implement amobile agent handler. Whether the mobile agent executes as anapplication, or an application native to the host peer performs theoperations in response to the mobile agent, the mobile agent may beconsidered to perform operations according to the configuration of itshost peer and/or function 1410.

Function 1410 may be configured to interact in various ways with thepeers hosting the mobile agent. For example, function 1410 may beconfigured to respond to identification requests from host peers, torequest data according to one or more protocols, or otherwise exchangeinformation and services with its host peers. Function 1410 of a mobileagent may be configured to update internal data structures of the mobileagent according to its interactions within the peer-to-peer networkand/or its host peers. In one embodiment, function 1410 may beconfigured to update internal data structures of its host peers. In oneembodiment, data may be stored as part of function 1410, including thepayload data 1431 or data for responding to identification requests fromhost peers, such as a certificate 1432. Similarly, the mobile agent mayreceive data from its host peers, and function 1410 may be configured tostore the data received as part of the mobile agent. In one embodiment,the itinerary 1420 may be stored as part of function 1410.

In one embodiment, a mobile agent handler may create a mobile agentwithout a function 1410 if mobile agent handlers that host the mobileagent are configured to provide a default or assumed function (e.g. aspart of an agreed-upon protocol) and the initiating peer wants thedefault or assumed operations to be performed. Default functions mayreduce the use of bandwidth, as the mobile agent may be smaller. In oneembodiment, a mobile agent may include only itinerary 1420. In oneembodiment, mobile agents may be configured to perform one or more of avariety of default or assumed functions.

In one embodiment, a mobile agent including only itinerary 1420 mayoperate in the peer-to-peer network as a peer discovery mobile agent. Apeer discovery mobile agent may travel from peer to peer according toits itinerary to detect whether the peers are still active in thenetwork. Peers hosting such a mobile agent may enable this functionaccording to the specification of a peer-to-peer platform and/orappropriate protocols, such as the exemplary peer-to-peer platform andpeer-to-peer platform protocols described below.

Function 1410 may be configured to compile results data as part of itsoperation on host peers and store that data as payload 1431. In oneembodiment, the results data may be stored as part of function 1410. Inone embodiment, the results data may be stored as part of itinerary1420, for example by amending the data in itinerary 1420 to indicateresults corresponding to each peer in the itinerary 1420. The resultsdata may be available to the initiating peer upon the mobile agentreturning to the initiating peer. In one embodiment, a mobile agenthandler of the initiating peer may extract the payload 1431 from themobile agent.

In one embodiment, results data may be sent to the initiating peer froma peer hosting the mobile agent 1400. In one embodiment, if the mobileagent 1400 cannot or does not return to its home initiating peer, themobile agent 1400 may send the results data to the initiating peer. Forexample, a mobile agent 1400 may include a timer such that the mobileagent may expire with the timer and the results gathered by the mobileagent at that time may be returned to the initiating peer. Sending onlyresults data instead of the mobile agent 1400 as a whole may savebandwidth. In one embodiment, results data are sent to the initiatingpeer as gathered by the mobile agent 1400. In one embodiment, a mobileagent 1400 may have a size limit and may return to its initiating peernode when approaching or exceeding that size limit to provide the datacollected to the home peer before resuming the itinerary. In oneembodiment, the size limit may be 4 kilobytes or some other sizeappropriate to avoid wasting bandwidth in the peer-to-peer network.Results data stored within a mobile agent 1400 may be available to hostpeers of the mobile agent 1400 so that the data may be shared with atleast some other peers. In one embodiment, function 1410 may set accessparameters concerning data that may be used or gathered from its mobileagent 1400 by host peers.

In one embodiment, function 1410 may be configured to perform morecomplex operations on host peer nodes. Embodiments may allow peers tohandle mobile agents with different or enhanced functions. In oneembodiment, a mobile agent may be configured to collect a plurality ofdifferent data or perform two or more different services. Host peernodes may collect or be configured to provide additional data orservices to host the mobile agent(s) depending on the requirements ofthe mobile agent(s) that may be used in the peer-to-peer environment. Inone embodiment, the protocols implemented by a peer-to-peer platformsuch as the exemplary peer-to-peer platform described below may provideoperations that may be combined to enable mobile agents to implement avariety of functions.

FIG. 38 illustrates a peer creating a mobile agent itinerary, forexample as described in FIG. 37, according to one embodiment. Theinitiating peer or mobile agent handler may access data regardingcommunications channels (e.g. pipes as described for the exemplarypeer-to-peer platform described below) in the peer-to-peer network togenerate an itinerary, as indicated at 1451. The pipe data may be partof advertisements in the peer-to-peer network. In one embodiment, otherdata available to the initiating peer regarding the peer-to-peer networkand its peers may be accessed. Some of the pipes information mayindicate whether the corresponding pipes may be dedicated for mobileagents or for other purposes and an itinerary may include pipes that areconfigured to be at least compatible with mobile agents, as indicated at1452. In one embodiment, pipe information may be pre-sorted, so that amobile agent handler may access the appropriate storage to access pipesthrough which mobile agents may be sent. In one embodiment, a mobileagent handler may distinguish between pipes based on other factorsrelevant to the purpose of the mobile agent. For example, a mobile agentmay be created to access a type of databases or find other peers in oneof a plurality of peer-to-peer network. A mobile agent handler may thensearch for advertisements indicating peers that may provide access tosuch databases or limit the search to advertisements with theappropriate peer-to-peer network.

A mobile agent handler may then select from the available data a list ofpipes from which to form an itinerary, as indicated at 1453. In oneembodiment, peers may be reached through different pipes and a mobileagent handler may select from the options available. The mobile agenthandler may then order the data, as indicated at 1454, which mayindicate some preference of the initiating mobile agent handler as tohow the mobile agent using that itinerary should proceed. In oneembodiment, a mobile agent handler may generate an ordered data setwhile or before selecting the different pipes to be included in anitinerary. For example, a mobile agent handler may rank pipes byreliability to provide a mobile agent a chance to travel as far aspossible and select pipes in that order. In one embodiment, the data maynot be pipes and the mobile agent handler may determine navigationinformation from that data to include in an itinerary similarly, suchthat the navigation information may abstract the details of thepeer-to-peer network topology and/or provide for dynamic handling ofnode failures. The mobile agent handler may then include the data setproduced as an itinerary as part of a mobile agent, as indicated at1455. In one embodiment, a mobile agent handler may format and includethe pipe data during selection, and may perform an ordering of that pipedata in a mobile agent itinerary at any time before the mobile agent islaunched.

In one embodiment, the initiating mobile agent handler may select datacorresponding to some known peers of its peer and organize it to createitinerary 1420, such as by including information regarding some peers aswell as communication channels in the peer-to-peer network. For example,the initiating mobile agent handler may select data concerning peers inone peer group. The data may be ordered in various ways, for exampleaccording to when there last was communication between the initiatingpeer and those peers, other factors, or combination of factors regardingnetworks and network communications, including volume of traffic,connectivity, topology, or node reliability.

In one embodiment, a mobile agent may be structured to include dataregarding its home peer, its unique identification data, a time-to-liveor timer, a current destination, an itinerary, and a function. Thefunction may be one or more Java classes executable on one or more nodesin the network. The itinerary may be a list of remaining navigation tobe performed, such as pipes to use or peers to visit. The currentdestination may be derived from the itinerary data and each host peersmay update the current destination and itinerary. The time-to-live ortimer may specify how long a mobile agent may wait on a host for aconnection to open or a peer to be reachable before abandoning itsattempts and trying another connection or peer in accord with theitinerary. In one embodiment, the time-to-live or timer may indicate howlong a mobile agent may operate in the peer-to-peer network.

FIG. 39 illustrates a mobile agent handler generating and using a mobileagent according to one embodiment. A mobile agent handler may generate amobile agent in response to an event. The event may be part of aprogram, clock, timer, operating system, network protocol or message, orother computing event that invokes or generates a request for a mobileagent. In one embodiment, the event may be a program or other computingelement invoking a function of a peer-to-peer platform implemented usinga mobile agent. Some events may not prompt the creation of a mobileagent, for example if the requesting program or user is not authorizedto invoke mobile agents.

As indicated at 1501, a mobile agent handler may gather network data andgenerate a mobile agent. The mobile agent may include itinerary dataderived from the network data gathered. The network data gathered andused, as well as the type of the mobile agent generated, may depend onthe event prompting the creation of the mobile agent. Different types ofmobile agents may be created in response to different factors to tailormobile agents for particular tasks. For example, the initiating peer maybe part of a plurality of peer groups, but the application prompting themobile agent may operate in only one peer group, so that the mobileagent created may be configured through its itinerary data to operate onpeers in that peer group. For example, only communication channelsbetween peers of that peer group may be included in the itinerary.Similarly, an initiating mobile agent handler may customize theconfiguration of the mobile agent's operations. For example, anapplication on the initiating peer may request verification of thestatus of the other peers in one or more peer groups. In response, amobile agent handler of the peer may create a mobile agent fordiscovering the status of peers in the corresponding peer groups. Theinitiating mobile agent handler may configure the mobile agent to gatherdata indicating the status of at least some peers indicated in theitinerary. In one embodiment a module, part of the operating system, orother software of the peer may be responsible for generating mobileagents for the peer, its applications, or other users of thepeer-to-peer network.

As part of gathering peer data as indicated at 1501, a peer or itsmobile agent handler may compile itinerary data for its mobile agentindicating one or more other peers for the mobile agent to visit. Thedata may represent communication channels in the peer-to-peer networkthat imply visiting the peer(s) forming the end-point(s) of eachcommunication channel. In one embodiment, an itinerary includingcommunication channel data may indicate that a mobile agent may travelthrough a plurality of communication channels before operating on theend-point peer. Any data accessible by the initiating peer may beselected and used to produce an itinerary if that data may be helpful tothe mobile agent in moving to the desired peers or through the desiredcommunication channels. For example, the itinerary data may be gatheredfrom data the initiating peers has regarding known peers, existingpipes, the network topology, or generally data about network resourcesor configuration. In one embodiment, the initiating peer may interactwith other nodes in the network to obtain data that may be used increating the mobile agent, particularly the itinerary. The itinerary maybe derived from a plurality of sources, including advertisements, username data, pipe data, and other data indicating resources and peers inthe network accessible to the initiating peer. Different sources ofinformation may be available in different network implementations or indifferent implementations of a network. In one embodiment, a peer maycompile data in anticipation of the data being useful when creatingmobile agents and itineraries.

A mobile agent handler may include data in the mobile agent indicatingits peer as the initiating peer. For example, an ordered itinerary inthe mobile agent may indicate the initiating peer by includingreferences to the initiating peer at the end of the itinerary. In oneembodiment, by default the last peer data in the itinerary data of amobile agent corresponds to its initiating peer. In one embodiment, datacorresponding to the initiating peer may be stored as part of anotherdata structure of the mobile agent rather than as part of the itinerary.

The initiating mobile agent handler may create the itinerary as anordered list of peers with information regarding each peer, such aslocation or address in a network. The itinerary data may be organizedsimilarly to a database, with a record containing one or more entriesfor each peer in the itinerary. In one embodiment, an initiating mobileagent handler may configure a mobile agent to process itinerary dataformatted according to one or more structures and may format theitinerary data included in the mobile agent accordingly. In oneembodiment, the initiating mobile agent handler may use a format that isrecognizable by potential host peers of the mobile agent, for exampleaccording to a standard format defined by peer-to-peer protocols or thepeer-to-peer platform implemented. The itinerary data may be a list ofpeers, and the list may be ordered to reduce the time and complexity forthe mobile agent to process or use it. The mobile agent may beconfigured to visit at least some of the peers indicated in itsitinerary. In one embodiment, the mobile agent may be configured todynamically select which peer it may next visit rather than follow anordering that may be indicated by the itinerary data. For example, amobile agent may select the next peer to visit from peers listed in itsitinerary data and the status of the network around its host. Networkstatus may take into account various factors, such as traffic,bandwidth, topology, and number of hops to reach a peer. A mobile agentmay be configured to eliminate peers from consideration for its nextdestination, for example depending on whether going to that peer wouldbe too time consuming, would add to network congestion around a peer,would result in the peer running out of time, or similar factors.

After generating the mobile agent, the initiating mobile agent handlermay attempt to contact another peer, as indicated at 1502. Theinitiating mobile agent handler may determine the peer to contactaccording to the itinerary for the mobile agent. In one embodiment, theinitiating mobile agent handler or peer provides the mobile agentresources for the mobile agent to attempt to contact a next peer. Forexample, the initiating peer may enable the mobile agent to execute andaccess hardware and/or software resources, such as a network connection.To attempt to contact the next peer, the initiating mobile agent handlermay use information indicating an appropriate communication channel. Forexample, an initiating mobile agent handler may access data indicatingan input pipe. The initiating mobile agent handler may test thecommunication channel or pipe, or open one, to the next peer over towhich to transmit the mobile agent. The mobile agent handler may useappropriate peer-to-peer protocols. In one embodiment, an adequatechannel is a pipe suitable for transmission of a mobile agent where thepeer at the other end is configured to receive a mobile agent.

The initiating mobile agent handler may determine whether successfulcontact was established with the next peer to which the mobile agent maybe sent, as indicated at 1503. For example, the initiating mobile agenthandler may communicate with a mobile agent handler on the next peer.The initiating mobile agent handler may wait for indication ofsuccessful contact for a specified amount of time. For example, thecreating mobile agent handler may wait for a message indicating that apipe was successfully established according to peer-to-peer protocols.In one embodiment, the initiating mobile agent handler may “ping” thenext peer, for example by sending a message and waiting for a responseindicating the next node may receive the mobile agent. If contact is notsuccessful, the initiating mobile agent handler may update the mobileagent, as indicated at 1504. For example, the initiating mobile agenthandler may amend or update the itinerary of the mobile agent to reflectthat contact could not be established with the corresponding peer. Theinitiating mobile agent handler may try to contact another peer as thenext peer for the mobile agent to visit, as indicated at 1502 anddescribed above. In one embodiment, if the next peer is the initiatingpeer or the itinerary of the mobile agent is empty, the initiatingmobile agent handler may terminate the mobile agent and/or useinformation derived from the failure to contact itinerary peers. Forexample, in network advertisements concerning peers that could not becontacted may be purged. If the initiating mobile agent handlerestablishes contact with a peer to which to send the mobile agent, theinitiating mobile agent handler may launch the mobile agent to that nextpeer, as indicated at 1505. After launching the mobile agent, theinitiating mobile agent handler may wait for the mobile agent to return,as indicated at 1506, with its payload. The mobile agent may return toits initiating peer in response to a time-out, after completing theitinerary, or generally as configured.

As indicated at 1507, the initiating mobile agent handler may extractpayload data from the mobile agent. The payload data may be used toupdate peer advertisements, network topology data, or other datastructures containing information regarding resources in thepeer-to-peer network. In one embodiment, the results data may be passedto a program or other potential user of the information, for example bycreating advertisements based on the information and disseminating themthrough the peer-to-peer network.

In one embodiment, the initiating mobile agent handler sends andreceives the mobile agent over one or more virtual communicationchannels. In one embodiment, the channels may be controlled or monitoredby a program configured to handle mobile agents. For example, a daemonmay be associated with one or more virtual communication channels of thepeer-to-peer network. A daemon is a program executing directly over anoperating system that may provide an engine or environment so that amobile agent may operate on the host peer through the daemon. A mobileagent handler may include or be implemented as a daemon. For example, apeer may include a daemon, as software and/or hardware, to handleservice requests and resources for mobile agents, which may be a mobileagent handler daemon. In one embodiment, a program monitoring one ormore communication channels may be configured to similarly provide anengine for one or more mobile agents.

The initiating mobile agent handler or peer may activate or otherwiseexecute the mobile agent after it is generated. For example, theinitiating peer or mobile agent handler may execute the mobile agent orany executable part of the mobile agent as a stand-alone application.Alternatively, the initiating peer may pass the mobile agent to adaemon, so that its function may be executed in that computationalenvironment. The daemon may provide a more secure computationalenvironment in which to execute a mobile agent. For example, memoryaccess of the mobile agent may be intercepted and verified by the daemonto ensure the mobile agent does not impermissibly affect other programsor resources of the peer hosting the mobile agent. In one embodiment,the mobile agent may execute through a demon, within a virtual machine,or in any other computation environment provided by the host peer. Ademon may be similar to a daemon but part of a larger applicationprogram, so that the function provided by a mobile agent may operate aspart of an application for example. The computation environment providedby a host peer to a mobile agent may depend on the level of trustafforded by or security concerns of the host peer with respect to themobile agent. For example, some environments for the mobile agent may bemore secure or may put more limitations than others on a mobile agent.

The mobile agent may operate as configured to perform one or more of itsassigned tasks. In one embodiment, if a mobile agent makes impermissiblerequests or operations, crashes, or otherwise cannot operate within theenvironment provided by a host peer, a host peer may suspend theoperations of the mobile agent. In one embodiment, the host peer ormobile agent handler may delete the mobile agent to free resourcesallocated to the suspended mobile agent. The host mobile agent handlermay access data included in the mobile agent, for example data regardingthe initiating peer of the mobile agent and/or accumulated payload data.The host mobile agent handler may notify the initiating peer of themobile agent status. The host mobile agent handler may send at leastsome of the payload data to the host peer.

In one embodiment, an initiating mobile agent handler may be configuredto launch the mobile agent after it is created without activating,executing, or following instructions from the mobile agent. For example,the initiating mobile agent handler may treat the mobile agent softwareas non-executable data to include in a message. In one embodiment, theinitiating mobile agent handler may enable the mobile agent to executeto launch itself to its next location but may intercept and/or restrictany other operations of the mobile agent. The mobile agent may determinea peer on which to relocate from its itinerary data and interact withthe initiating mobile agent handler to find a communication channel anduse it to be sent to that other peer. In one embodiment, sending themobile agent involves duplicating the data from the initiating peer tothe next peer. So that multiple copies of the mobile agent exist brieflyin the peer-to-peer network, the copy of the mobile agent on theinitiating peer may be then be deleted.

FIG. 40 illustrates a peer or its mobile agent handler receiving andhandling a mobile agent according to one embodiment. A mobile agenthandler may receive the mobile agent, as indicated at 1601, through acommunication channel, such as a pipe. In one embodiment, the mobileagent is sent from a peer in at least one peer group of the receivingpeer and may be routed through one or more nodes in the network. Themobile agent may conform to protocols of the peer-to-peer platform andmay be received as part of a message according to one or more networkcommunication protocols. In one embodiment, a daemon or program otherthan the mobile agent handler may be associated with a communicationchannel to monitor for mobile agents and the receiving peer may receivethe mobile agent over that communication channel.

The receiving peer or mobile agent handler may determine whether to hostthe mobile agent, as indicated at 1602, based on its configurationand/or the configuration of the mobile agent received. In oneembodiment, the determination of whether to host a mobile agent is madeby the mobile agent handler, a daemon, or other program configured tohandle mobile agents for the receiving peer. The receiving mobile agenthandler may refuse to host the mobile agent on its peer depending on oneor more factors, including security and availability of resources. Forexample, a receiving peer or its mobile agent handler may already behandling a large number of other applications or mobile agents and maybe configured to reject other requests until current tasks terminate. Areceiving peer may not have sufficient memory available to host thereceived mobile agent, particularly if the receiving peer is configuredto limit the amount of memory that may be used by mobile agents at agiven time.

In one embodiment, the receiving mobile agent handler may obtain datafrom the mobile agent to determine whether to host that mobile agent.For example, a mobile agent may include data identifying the mobileagent, such as a unique identification number or certificate, forexample as shown at 1432 in FIG. 37. Identifying data may includecredentials or certificates according to peer-to-peer protocols or otherstandard defined by the peer-to-peer protocols. The mobile agent handlermay access the identifying data and verify it, for example against adatabase in the network or on the receiving peer. In one embodiment, themobile agent structure conforms to peer-to-peer protocols indicating thedata in the mobile agent that may be identifying data, for example bylabeling that data using XML tags according to a peer-to-peer protocol.In one embodiment, the mobile agent may include an interface that may beused to obtain data from the mobile agent, including identifying data ofthe mobile agent. If the identifying data is not appropriate orsufficient for the receiving peer, the mobile agent handler, a daemon,another program, or the receiving peer generally may decline to providean engine for the mobile agent or to follow any instructions from themobile agent, as indicated at 1602. Alternatively, the mobile agent maybe hosted on the receiving peer, as indicated at 1602. In oneembodiment, it may be determined that the mobile agent received wasinitiated from the current peer and may proceed as indicated at 1507 inFIG. 39.

A peer hosting the mobile agent may perform the operations of the mobileagent, as indicated at 1603. For example, the host peer, a mobile agenthandler, or some other program of the host peer may perform operationsaccording to instructions included in the mobile agent. In particular, ahost mobile agent handler may access a script in the mobile agent andperform computation according to that script. In one embodiment, thehost mobile agent handler may perform the operation by executingexecutable code of the mobile agent. The mobile agent may be executed asa stand-alone program or within a computation framework such as avirtual machine, a program space, a daemon, a demon, or other engineenabling the execution of the mobile agent functions provided by thehost peer. The computing environment provided for the mobile agent maybe configured according to security, permissions, or other parametersand settings that may affect how mobile agent functions are performed.

The host mobile agent handler may update one or more of the internaldata structures of the mobile agent, as indicated at 1604, in responseto operation according to the mobile agent configuration. In onembodiment, where the mobile agent may be executing as an application onthe host peer, the mobile agent may modify data in its data structure inresponse to its operation. The structure and/or content of the mobileagent may be changed during operations according to the mobile agentconfiguration. For example, new peers may be added or removed from theitinerary, data concerning peers in the itinerary may be added to themobile agent, the function of the mobile agent may be modified, or datamay be re-organized.

In one embodiment, the host mobile agent handler may access some datastored internally as part of performing operations in response to themobile agent. The host mobile agent handler may update the internal dataof the mobile agent to indicate address, configuration, location,status, or provide some other information regarding its peer. Forexample, the host mobile agent handler may be configured to accessadvertisements, such as advertisements according to peer-to-peerprotocols, and compile data for including in the mobile agent. The hostpeer may invoke some of its local or network services on behalf of themobile agent. For example, the host peer may include functions for datasearch and the operations of the mobile agent may concern theavailability of particular data on peers, so that the host peer mayinvoke the data search service to determine if it includes that data.

In one embodiment, the host mobile agent handler may access datacorresponding to peers, services, data, or other resources in thepeer-to-peer network from its internal data structures or networkresources. The host mobile agent handler may amend the itinerary of themobile agent received to include additional peers for the mobile agentto visit. For example, the mobile agent received may have been launchedto discover or test the status of peers in a peer-to-peer network orpeer group with an itinerary including data for a number of peers knownto the initiating peer. The host mobile agent handler may include dataindicating other peers in the network that were not included originallyon the itinerary of the mobile agent. In one embodiment, the host mobileagent handler may amend the itinerary data of the mobile agent toinclude these other peers. In one embodiment, the host mobile agenthandler may be configured to look for information indicating peers orother resources previously unknown to the received mobile agentcorresponding to configuration parameters for the operation of themobile agent. The host mobile agent handler may then add to theitinerary or other data structure of the mobile agent collected datarelevant to the mobile agent according to configuration parameters ofthe mobile agent and/or the host peer. For example, the mobile agent mayhave been created to discover certain types of peers for the initiatingpeer, such as peers that have certain data, provide certain services,have certain connections, or have some other property or combination ofproperties in the peer-to-peer network.

In one embodiment, the host mobile agent handler may access data storedas part of a received mobile agent to update its own internal datastructures and may pass it on to its peer. For example, the mobile agentmay include more up-to-date data about peers of the host peer. The hostmobile agent handler may retrieve some of the data from the mobile agentor may use interfaces or services provided by the mobile agent to obtaindata from the mobile agent. In one embodiment, the host mobile agenthandler may update data within local data structures in response to theoperations of the mobile agent or may enable the mobile agent to modify,add, and/or delete data from local data structures. In one embodiment, ahost mobile agent handler may request data from the mobile agent and mayformat the requests according to a peer-to-peer protocol. A host mobileagent handler may change the function of a mobile agent. For example,part of the function of a mobile agent may be to return its results toits initiating peer, but its initiating peer may have failed. A hostmobile agent handler may adopt a mobile agent by amending theconfiguration of the mobile agent to have the mobile agent return itsresults to its current host. The host mobile agent handler may similarlychange other aspects of the mobile agent, and a host mobile agenthandler may reformat a mobile agent to enable the mobile agent tooperate in a different network, for example. A host mobile agent handlermay change elements of a mobile agent in response to instructions fromthe mobile agent.

After the host mobile agent handler completes or ends the operations ofthe mobile agent's function, the host mobile agent handler may attemptto relocate the mobile agent to another peer according to the itineraryof the mobile agent. The itinerary may be an amended itinerary. The hostmobile agent handler may access the itinerary data of the mobile agentto determine a next peer to which to send the mobile agent. The hostmobile agent handler may access the itinerary data through a service orinterface of the mobile agent. In one embodiment, the host mobile agenthandler may invoke a function of the mobile agent that returns datacorresponding to the next peer the mobile agent is configured to visit.

The host mobile agent handler or peer may attempt to contact the nextpeer to which to send the mobile agent, as indicated at 1605. The hostmobile agent handler may use an existing communication channel to thenext peer if available or may establish a connection if required. Thehost mobile agent handler may follow or use protocols of thepeer-to-peer network to establish a peer-to-peer connection with thenext node. In one embodiment, the host mobile agent handler establishesa pipe to the next peer. If a first contact attempt is not successful,for example if the next peer is not responding, the host mobile agenthandler may repeat its attempts. As indicated at 1606, if a host mobileagent handler cannot contact the next peer, the host mobile agenthandler may interact with the mobile agent and select another peer asthe next peer for the mobile agent. The host mobile agent handler mayupdate the data included in the mobile agent, as indicated at 1604. Forexample, the host mobile agent handler may amend the mobile agent and/ornotify the mobile agent to indicate the failure to reach the next peer.The host mobile agent handler may also interact with the mobile agent asdescribed above to determine another next peer, as indicated at 1605.

Upon successfully connecting with a next peer for the mobile agent tovisit according to the configuration of the mobile agent and/or the hostpeer, the host mobile agent handler may send the mobile agent to thenext peer, as indicated at 1607. The mobile agent may be sent over acommunication channel opened or created when contacting the next peer. Apeer that hosted a mobile agent may close communication channels orpipes that were opened or used by the mobile agent. In one embodiment, anext peer may be determined before or while the operations of the mobileagent proceed.

FIG. 41 illustrates the operation of a mobile agent according to oneembodiment. A mobile agent handler in a peer-to-peer network may createthe mobile agent. The mobile agent may include data identifying itsinitiating peer in the peer-to-peer network, for example a peeridentifier of the exemplary peer-to-peer platform described below. Inone embodiment, a mobile agent may be configured as described in FIG.37. In one embodiment, a mobile agent handler, an application, aprogram, software, and/or hardware of a peer may be configured togenerate the mobile agent for operating in a peer-to-peer network aspart of or through a peer-to-peer platform implemented on the peer, suchas the exemplary peer-to-peer platform described below. The mobile agentmay be configured to gather data from peers and/or perform variousoperations in the peer-to-peer network.

A mobile agent may be launched to another peer in the network, asindicated at 1701. An itinerary of the mobile agent may include datacorresponding to its destination in the network. The initiating mobileagent handler may set-up the parameters for communication, format themobile agent for sending to the next peer, and launch the mobile agent.The mobile agent may be transmitted between the initiating peer and thenext peer. In one embodiment, as parts of the mobile agent aregenerated, the initiating peer may send them to the next peer before orwhile other parts may be generated. In one embodiment, rather thanhandle the details of launching a mobile agent directly, the initiatingpeer or mobile agent handler may configure the mobile agent to handleits launch and navigation of the network according to its itinerary andenable the mobile agent to operate according to that configuration. Forexample, the initiating peer may act as a host peer for the mobileagent. For example, its mobile agent handler may activate the mobileagent as an application with access to resources of the initiating peersuch as a network connection. The mobile agent may then determine a nextpeer to visit, arrange for a communication channel to that next peer,and then be launched to the next peer using the communication channel.An initiating peer that enables a mobile agent to operate or execute maybehave toward the mobile agent as a host peer. The mobile agent may beconfigured to use a pipe as the communication channel and may operatethrough the peer-to-peer platform implemented on the initiating peer.

In one embodiment, a duplicate of the mobile agent is transmitted fromthe initiating peer to the next peer. The copy on the initiating peermay be deleted after the mobile agent is launched, for example afterreceiving confirmation of the transmission from the next peer. Theexecution state of the mobile agent, for example the data in the heap,stack, and other data structures may be reflected in the mobile agent astransmitted to the next peer to enable the next peer to host the mobileagent to properly execute the mobile agent. For example, a new host forthe mobile agent may configure a memory space for the mobile agent withthe settings and data that the mobile agent had on its last host beforelaunching, so that the mobile agent may pick up execution where it wasleft off. In one embodiment, a mobile agent may put its internal data ina state enabling it to restart computation from scratch at a new hostpeer. For example, the mobile agent may perform updates to its itineraryand other data structures so that when the mobile agent is next executedit need not be aware of previous operations on other hosts; a host peermay execute the mobile agent as a new program.

In one embodiment, the mobile agent launches to a next peer, asindicated at 1701, through a designated pipe of the peer-to-peer networkthat has the next peer as its end-point. The pipe end-point may bemonitored on the next peer, for example by a mobile agent handler, adaemon or other program configured to handle data received through thepipe. An initiating peer may create a pipe in the network to the nextpeer to form a peer-to-peer connection over which to launch the mobileagent. In one embodiment, the mobile agent may be routed through one ormore nodes of the network forming parts of the pipe before reaching thenext peer. For example, the initiating peer may implement a peer-to-peerplatform that is configured to provide a protocol for establishing apeer-to-peer connection to another node in the network implementing asimilar peer-to-peer platform. The protocol may establish acommunication channel to enable peer-to-peer interaction between theinitiating peer and the next peer. The communication channel may involveone or more connections and nodes in the network, so that the mobileagent may travel through one or more network nodes between itsinitiating peer and the next peer on its itinerary.

After reaching the next peer, the mobile agent may access its hostmobile agent handler or peer, as indicated at 1702. For example, themobile agent may obtain access to resources on the host peer such asmemory, network resources, and/or processor time for the mobile agent toperform its functions. In one embodiment, the mobile agent may beconfigured to request resources of its host peer. Accessing the hostpeer may involve housekeeping functions such as allocating memory,declaring methods, and/or establishing an interface with other elementsof the host peer. The mobile agent may be configured to provide the hostpeer information regarding services the mobile agent may provide. Forexample, the mobile agent may provide data indicating interfaces of themobile agent according to a peer-to-peer protocol. The host peer mayinteract with the mobile agent by invoking functions of the mobile agentthrough the interface as indicated by the mobile agent. In oneembodiment, the mobile agent may be formatted so that a host mobileagent handler may recognize the data and services that a mobile agentmay provide. For example, a mobile agent may use HTML or XML tags toindicate data and provide information about its interface and theservices the mobile agent may provide. In one embodiment, interactionsbetween a host mobile agent handler and a mobile agent are performedaccording to a common peer-to-peer protocol. In one embodiment, the hostpeer may operate with the mobile agent through a peer-to-peer platformimplemented on the host peer and providing peer-to-peer protocolscompatible with the configuration of the mobile agent received.

In one embodiment, a mobile agent handler receiving a mobile agent maydeny access to the received mobile agent, ensuring that the peer willnot function as a host. For example, security reasons or incompatibleconfigurations or parameters may prompt the receiving peer to not hostthe mobile agent received. The receiving mobile agent handler mayinstead relocate the mobile agent, for example as described above forFIG. 40. Relocation may be invisible to the mobile agent, as thereceiving peer may change the mobile agent in such a way that the mobileagent may continue to operate after being relocated without disruptionand/or may not otherwise interact with the mobile agent. For example,the receiving mobile agent handler may attempt to determine from theitinerary of the mobile agent some other peer to which the mobile agentmight be sent. The receiving mobile agent handler may amend the mobileagent to configure it to expect to operate on the other peer. Thereceiving mobile agent handler may then launch the mobile agent to theother peer.

In one embodiment, the receiving mobile agent handler may return amobile agent to its initiating peer or to the peer that sent the mobileagent to the receiving peer. In one embodiment, a receiving mobile agenthandler may terminate or delete a mobile agent. If a receiving mobileagent handler terminates a mobile agent, the peer that created themobile agent may be notified that its mobile agent was terminated.Deleting a mobile agent may be performed if a mobile agent handler thatreceives or hosts a mobile agent determines that the mobile agent may bea threat to its peer, network, other nodes, or other resources. Forexample, the mobile agent handler may detect that the mobile agent isinfected with a virus or other code that may cause some unexpected orundesirable event. In one embodiment, a receiving mobile agent handlermay attempt to correct or clean a mobile agent from its errors orviruses. In one embodiment, a mobile agent may include data or may beconfigured to provide data to a peer so that the peer may determinewhether to host the mobile agent. For example, the mobile agent mayinclude data certifying its authenticity, its integrity, and/or itsorigin. A host mobile agent handler may access one or more networkresources to check the validity of such data or rely on keys,algorithms, encryption, or other security tools that may be implementedas part of its peer-to-peer platform.

The mobile agent may determine whether the peer hosting the mobile agentis the peer that initiated the mobile agent, as indicated at 1703. Ifthe host peer is not the initiating peer, the mobile agent may performone or more functions as indicated at 1704. For example, the mobileagent may provide some service on or gather data from the host peer. Themobile agent may interact with the host peer as part of performing itsfunctions. In one embodiment, the mobile agent may use or accessresources of the host peer such as data regarding the peer-to-peernetwork. The host peer may provide services for the mobile agent toaccess local data. For example, the host peer may provide functions fordata search. Host services may be advertised according to peer-to-peerprotocols and accessible by the mobile agent according to peer-to-peerprotocols.

The mobile agent may update its internal data, as indicated at 1705,using information obtained from the host peer or from its operations onthe host peer. In one embodiment, the mobile agent may access data onthe host corresponding to peers, services, data, or other resources inthe peer-to-peer network. The mobile agent may update its itinerary toindicate that it visited its current host, what operations whereperformed, and/or results obtained. In one embodiment, a mobile agentmay wait until it reaches the next peer to update its itinerary toindicate that it visited the previous peer. After indicating that itvisited a peer, a mobile agent's itinerary may ensure that the mobileagent does not visit that peer again.

In one embodiment, the mobile agent may be configured to amend itsitinerary to include additional peers to visit. For example, a mobileagent may be launched to discover or test the status of peers in apeer-to-peer network with an itinerary including data for a number ofpeers known to the initiating peer. Upon reaching one of the peers onits itinerary, the mobile agent may access data indicating other peersin the network that were not included originally on its itinerary. Inone embodiment, the mobile agent may amend its itinerary data to includethese other peers. The mobile agent may be configured to look forinformation indicating previously unknown peers or other resources. Themobile agent may add to its itinerary some of the peers it discovers butnot others, according to parameters established by its initiating peerin its configuration. For example, the mobile agent may have beencreated to discover certain types of peers for the initiating peer, suchas peers that have certain data, provide certain services, have certainconnections, or have some other property or combination of properties inthe peer-to-peer network.

In one embodiment, a mobile agent may share its internal data with itshost. A mobile agent may send some of its internal data to its hostmobile agent handler, peer, programs, hardware, or other element of thehost peer. A host may request data from a mobile agent according to apeer-to-peer protocol. In one embodiment, the host mobile agent handlermay access data from the mobile agent it is hosting. The host may parsethe mobile agent searching for tags, keywords, or other indicatoraccording to a standard protocol that describe the data stored in mobileagent.

After completing its operations on its current host, a mobile agent mayattempt to contact another peer to which it may relocate selectedaccording to its itinerary, as indicated at 1706. The mobile agent mayaccess its itinerary data to determine which peer it should next visit.The mobile agent may be configured to perform one or more attempts toestablish a peer-to-peer connection, such as a pipe, to the next peer.In one embodiment, the mobile agent may access its host to determine ifa communication channel between its host and next peer to visit alreadyexists and may use that connection if possible. In one embodiment, themobile agent may request a suitable connection to its next peer from itshost peer using a protocol of the peer-to-peer platform implemented byits host.

Depending on whether contact can be established to the next peer themobile agent is configured to visit, as indicated at 1707, the mobileagent may launch to the next peer and continue operating from there, asindicated at 1702, or may note that it could not contact that peer andselect another next peer to visit, as indicated at 1705. The mobileagent may repeat 1701-1707 until the mobile agent reaches its initiatingpeer, as indicated at 1703. Upon reaching its initiating peer, themobile agent may include payload data for the initiating peer. In oneembodiment, the mobile agent may return payload data by transmitting thepayload data from a host peer to the initiating peer. The mobile agentmay be prompted to return its payload data by the expiration of a clock,a timer, or a host to peer, even if its host peer is not its initiatingpeer.

Peer Group Presence Detection

Embodiments of a mobile agent may be configured to travel in a peergroup along an itinerary to determine the status of the peers in thepeer group. For example, the mobile agent function may be configured torecord as the mobile agent payload the list of peers successfullyvisited. The function may be configured to update the list at each peerit reaches. In one embodiment, a mobile agent may update its payloadafter determining that it may travel to another peer and before reachingthat peer. In one embodiment, if a mobile agent cannot reach a peerindicated by its itinerary, the mobile agent may record this status orignore that peer and then proceed to attempting to reach another peer onits itinerary.

In one embodiment, a mobile agent may be launched by an initiating peerin a peer group (e.g. at varying or periodic intervals) to attempt tovisit each member peer in a peer group. The itinerary of the mobileagent may include information for accessing each member peer of the peergroup (e.g. an advertisement for a mobile agent input pipe for each ofthe member peers). The mobile agent may return to its initiating peerwith a payload indicating which of the member peers it was successful incontacting and visiting (or alternatively indicating which of the memberpeers it was unsuccessful in contacting and visiting).

FIG. 42 illustrates a member peer in a peer group using a mobile agentto detect peer group member presence according to one embodiment. In oneembodiment, the peer group may be implemented in a peer-to-peer networkimplemented according to the exemplary peer-to-peer platform asdescribed below. In this embodiment, each peer 200 in peer group 210 mayadvertise an input pipe for receiving incoming mobile agents, e.g. whena particular module (e.g. service, application, etc.) is active. In thisexample, peers 200A, 200B, and 200D are members of peer group 210, andpeers 200C and 200E are not member peers. Peer 200A may, if desired,generate and launch a mobile agent 1400 to detect peer group memberpresence. The mobile agent may include an itinerary of advertised pipesfor member peers. The mobile agent 1400 may travel to each member peerin its itinerary, and return to the originating peer 200A when done. Thepeer 200A may then access the mobile agent's payload to determinecurrent peer group presence at the time of the mobile agent's visit(s).In one embodiment, mobile agents 1400 may be used by modules (e.g.services, applications, etc.) to detect peer group presence of otherinstances of the module in the peer group.

As an example, an information management (IM) application may create aninput pipe with a name formatted according to:

-   -   <user handle>.agentDaemon.IMapp        For example:    -   UserName.agentDaemon.IMapp        Note that the name format and example are exemplary and are not        intended to be limiting. The name may then be advertised in a        pipe advertisement along with a unique identifier (e.g. a URN or        UUID as described below for the exemplary peer-to-peer        platform).

If:

-   -   UserName(i), i=1 . . . n        were then in a given peer group, p, such as peer group 210 of        FIG. 42, each such member may use the peer-to-peer platform pipe        discovery protocol to find as many of these advertisements as        possible, and may add to this list other usernames that the        member may have acquired by other methods (e.g. received in        other advertisements), thus giving each such peer group member a        “buddy list” (note that the buddy list does not necessarily        include all of the members of the peer group):    -   UserName(k), k=1 . . . m

Each member peer running the IM application may then, when desired,launch a mobile agent on the peer-to-peer network with the “buddy list”of pipe names as an itinerary, along with the associated daemon pipename of the originating peer so that the mobile agent may return to theoriginating peer after attempting to visit the owner of each advertisedpipe. In one embodiment, the mobile agent may be launched periodically.

In one embodiment, the mobile agent may include a “presence template”constructed at the originating member peer that may include one or moreof, but is not limited to, the following elements:

-   -   Home—the originating peer's application daemon pipe name.    -   Unique identifier—Identifier used by the daemon as a launch        identifier.    -   Time-to-live—Indicates how long to wait before abandoning a        particular pipe on the itinerary.    -   To—The immediate destination peer's daemon pipe name.    -   Itinerary—The remaining list of daemon pipe names to visit.    -   Return payload—Application-dependent return data.    -   Class—A class (e.g. Java class) that may be executed on each        peer.    -   Parameters—May be passed to a Class at execution time.    -   Signature—Used to guarantee a Class's integrity (e.g. a subset        of an X509.V3 certificate).

For the presence mobile agent, the return payload may be a list of peerssuccessfully visited. Mobile agents for other tasks may have otherpayloads.

When a presence mobile agent arrives at a peer on its itinerary, thepeer may update the return payload, and then may attempt to contact anext peer on the itinerary. In one embodiment, the peer may acquire thepipe advertisement from the itinerary (or alternatively acquire the pipeadvertisement from elsewhere using information in the itinerary). If thepipe advertisement is acquired, the peer may attempt to open theadvertised pipe. If successfully opened, the peer may attempt to send amessage with appropriately updated “To”, “Itinerary”, and “Returnpayload” fields to the input pipe specified by the advertisement. If theabove is successful, the mobile agent arrives at the next itinerary hop.If failure occurs at any point, then the next “hop” on the itinerary maybe selected and the above repeated until the mobile agent successfullyreaches a “hop” on the itinerary or is returned to the originating peerif no “hops” are reached. When the mobile agent returns to theoriginating peer, the active “buddy list” may be made current using thepayload of the mobile agent.

FIG. 43 is a flowchart illustrating detecting presence in a peer groupusing a mobile agent according to one embodiment. As indicated at 1790,an initiating peer node launches a mobile agent including an itineraryof a group of peer nodes to be visited. In one embodiment, the itinerarymay be generated from presence information indicating member peer nodesthat may be present in the group. The initiating peer node and the peernodes indicated by the itinerary are member peer nodes in the group ofpeer nodes in a peer-to-peer network. To launch the mobile agent, theinitiating peer node may send the mobile agent to a first peer nodeindicated by the itinerary. In one embodiment, the initiating peer nodemay determine a first peer node on the itinerary that is available toreceive the mobile agent.

As indicated at 1792, the mobile agent collects indications of presencein the group of peer nodes indicated by the itinerary. To collect theindications of presence, the mobile agent may visit one or more of theplurality of peer nodes indicated by the itinerary. A peer nodeindicated by the itinerary and available to receive the mobile agent mayreceive the mobile agent from a previous peer node (either theinitiating peer node or one of the peer nodes on the itinerary). In oneembodiment, on a visited peer node, an indication that the peer node hasbeen visited by the mobile agent may be stored in a payload of themobile agent. The visited peer node may then send the mobile agent to anext peer node indicated by the itinerary. In one embodiment, the peernode may select a next peer node indicated by the itinerary as a targetpeer node. The peer node may determine if the target peer node isavailable to receive the mobile agent. If the target peer node is notavailable to receive the mobile agent, the peer node may select asubsequent (unvisited) peer node as the target peer node and determineif the target peer node is available to receive the mobile agent. In oneembodiment, this process may continue until either a target peer node isfound that is available to receive the mobile agent or until theitinerary is exhausted (i.e. there are no more unvisited peer nodes thatare available to receive the mobile agent on the itinerary).

If a target peer node is found that is available to receive the mobileagent, the peer node may send the mobile agent to the target peer node.If the itinerary is exhausted before finding an available target peernode, the peer node may return the mobile agent to the initiating peernode. In one embodiment, the mobile agent may include contactinformation for returning the mobile agent to the initiating peer node.Thus, the mobile agent may continue visiting available peer nodes on theitinerary until the itinerary is completed. At each successfully visitedpeer node, an indication that the mobile agent has visited the peer nodemay be stored in the mobile agent to indicate the visited peer node ispresent in the peer group. When the mobile agent returns to theinitiating peer node, the mobile agent provides the presence indicationsof the one or more visited peer nodes on the itinerary that weresuccessfully visited to the initiating peer node.

As indicated at 1794, the initiating peer node may then update thepresence information indicating presence of member peer nodes in thegroup in accordance with the indications provided by the mobile agent.In one embodiment, the initiating peer node may indicate in the presenceinformation that one or more of the plurality of peer nodes not visitedby the mobile agent are not present in the group of peer nodes. In oneembodiment, the initiating peer node may remove from the presenceinformation indications that one or more of the plurality of peer nodesnot visited by the mobile agent are present in the group of peer nodes.

In one embodiment, the initiating peer node may subsequently launch themobile agent with an itinerary indicating member peer nodes indicated aspresent in the peer group as indicated by the updated presenceinformation. In one embodiment, other member peer nodes may launchmobile agents with itineraries indicating other member peers in the peergroup to update presence detection on the other member peer nodes. Inone embodiment, the initiating peer node may provide the presenceinformation to other member peer nodes in the group. In one embodiment,the initiating peer node may launch mobile agents including itinerariesof member peer nodes in other groups of peers in which the initiatingpeer node is a member to update presence information for the other peergroups.

In one embodiment, the peer nodes in the peer-to-peer network may beconfigured to implement a peer-to-peer environment according to apeer-to-peer platform such as the exemplary peer-to-peer platformdescribed below which includes one or more peer-to-peer platformprotocols for enabling the peer nodes to discover each other,communicate with each other, join peer groups, and send and receivemobile agents in the peer-to-peer environment. In one embodiment, pipesimplemented according to the peer-to-peer platform may be used to sendthe mobile agent between peer nodes on the itinerary.

Collaborative Content Control

Version control may be a concern when performing collaborative contentsharing in a peer-to-peer environment such as a peer-to-peer environmentimplemented according to the exemplary peer-to-peer platform describedbelow. For example, if a peer group is formed to do collaborativecontent writing, and its members are sharing and editing one or more ofthese documents, a mechanism may be desired or required to guaranteethat edits are applied to most recent version of these documents.Embodiments of the system and method for implementing mobile agents inthe peer-to-peer environment may be configured to perform versioncontrol for collaborative content sharing among groups of peers inpeer-to-peer networks.

In one embodiment, when a group of n peers is formed that may desire orrequire collaborative content sharing, each member peer in the group maygenerate a communications channel (e.g. input pipe as described for theexemplary peer-to-peer platform) to receive incoming mobile agents. Eachmobile agent may have as an itinerary an identifier or other indicatorfor the communications channels (e.g. input pipes) of the other membersof the peer group. In one embodiment, n may be variable, as peers mayjoin and leave the group dynamically. In one embodiment implementedaccording to the exemplary peer-to-peer platform, the value of n may bedetermined by the peer-to-peer platform pipe discovery protocol.

Given the itinerary, one or more of the peer group members may launchmobile agents to resolve version conflicts of a given set of documentsd(i), i=1 . . . k. In one embodiment, the document names may be includedin a mobile agent. In one embodiment, the document names may be part ofa mobile agent payload. In one embodiment, a mobile agent may alsoinclude a function to perform conflict resolution at each peer that itvisits. In one embodiment, the function may be a Java class. In oneembodiment, the Java class may be a certified Java class.

In one embodiment, the mobile agent may collect version information fromeach visited peer for each document and return to the initiating peer.Upon returning to the initiating peer, the mobile agent may include alist of visited peers and document versions on the visited peers. In oneembodiment, the mobile agent may also include content size of thedocuments. In one embodiment, the documents may be ranked, for examplefrom most recent to least recent versions.

In one embodiment, the mobile agent may return the actual document(s)with the highest (latest) version. Alternatively, a reference to thedocument(s) with the highest (latest) version may be returned. In oneembodiment, a document reference may include an identifier (e.g. a URI,URN, or UUID) for the document and a communications channel (e.g. pipe)identifier for accessing the document. In one embodiment, the documentidentifier may be application-dependent. The initiating peer may thenacquire a highest (latest) version of the document if desired. Returninga reference rather than the actual document may help decrease bandwidthusage, as a peer may acquire the document only if desired or necessary.

In one embodiment, documents may be write locked to permit member peersin the group of peers to become coherent before a collaborative editingsession begins. In one embodiment, a mobile agent to perform versioncontrol for peer groups using collaborative context sharing may belaunched before, during, and/or after an editing session as long aswrite locking is performed during the session. In one embodiment, mobileagents may be used to gather and return active document informationincluding document names during an editing session. One embodiment mayinclude a user interface for presenting gathered document information.

In one embodiment, visited peers may use the accumulated payload todetermine if their version of the document(s) are up to date and, ifnot, may add a version update request to the payload. Upon receiving thefinal payload, the initiating peer may send the most recent versioninformation to peers that added version update requests to the payload.

FIG. 44 is a flowchart illustrating collaborative content control in apeer group using a mobile agent according to one embodiment. Asindicated at 1800, an initiating peer node may launch a mobile agentincluding an itinerary of a group of peer nodes to be visited andindications of one or more documents that the group of peer nodes arecollaboratively editing in an editing session. In one embodiment, tolaunch a mobile agent, the initiating peer node may send the mobileagent to a first peer node indicated by the itinerary.

As indicated at 1802, the mobile agent may visit one or more of thesubset of the plurality of peer nodes indicated by the itinerary tocollect version information for the one or more documents on the one ormore visited peer nodes. In one embodiment, the version information mayinclude indications of versions for each of the one or more documents onthe peer nodes indicated by the itinerary and indications of thecorresponding peer nodes including the indicated versions. In oneembodiment, the indications of versions and the correspondingindications of peer nodes may be stored in the mobile agent in one ormore lists each sorted from a most recent to a least recent version ofthe corresponding document. In one embodiment, the version informationmay include size information for each version of each of the one or moredocuments. In another embodiment, the most recent version of each of theone or more documents may be included in the mobile agent. In oneembodiment, the mobile agent may store the collected version informationin a payload of the mobile agent. To provide the version information tothe initiating peer node, the mobile agent may return to the initiatingpeer node with the payload after visiting the one or more of the subsetof the plurality of peer nodes indicated by the itinerary.

In one embodiment, the version information may include a reference tothe most recent version of each of the one or more documents. Areference may be used for accessing the corresponding document on thepeer-to-peer network. In one embodiment, the reference may include aUniform Resource Indicator (URI), such as the URIs described for theexemplary peer-to-peer platform described below, corresponding to thedocument. In one embodiment, the reference may include a communicationschannel identifier such as the pipe identifiers described for theexemplary peer-to-peer platform described below. In one embodiment, thereference may include an advertisement such as the pipe advertisementsdescribed for the exemplary peer-to-peer platform described below.

In one embodiment, each visited peer node may receive the mobile agentfrom a previous peer node. The version information for versions of theone or more documents on the peer node may be stored in a payload of themobile agent. The peer node may then send the mobile agent to a nextpeer node. In one embodiment, to send the mobile agent to a next peernode, the peer node may determine if the mobile agent has completed theitinerary. If the mobile agent has not completed the itinerary, the peernode may send the mobile agent to a next peer node indicated by theitinerary. If the mobile agent has completed the itinerary, the peernode may return the mobile agent to the initiating peer node.

As indicated at 1804, after receiving the version information collectedby the mobile agent, the initiating peer node may coordinate each of theone or more documents on the group of peer nodes to a most recentversion in accordance with the version information provided by themobile agent. In one embodiment, to coordinate each of the one or moredocuments, the initiating peer node may first lock the one or moredocuments to limit access to the documents during coordination. In oneembodiment, to coordinate each of the one or more documents, theinitiating peer node may provide the most recent version of each of theone or more documents to one or more other peer nodes in the group ofpeer nodes. In another embodiment, to coordinate each of the one or moredocuments, the initiating peer node may provide access information forobtaining the most recent version of each of the one or more documentsto one or more other peer nodes in the group of peer nodes.

In one embodiment, the initiating peer node may coordinate each of theone or more documents on the group of peer nodes to the most recentversion prior to, during, and/or after an editing session on thedocument. To coordinate the documents during an editing session, thedocuments may be locked to limit access to the documents duringcoordination.

In one embodiment, the peer nodes in the peer-to-peer network may beconfigured to implement a peer-to-peer environment according to apeer-to-peer platform such as the exemplary peer-to-peer platformdescribed below which includes one or more peer-to-peer platformprotocols for enabling the peer nodes to discover each other,communicate with each other, join peer groups, share content includingcollaboratively edited documents, and send and receive mobile agents inthe peer-to-peer environment. In one embodiment, pipes implementedaccording to the peer-to-peer platform may be used to send the mobileagent between peer nodes on the itinerary.

FIG. 45 illustrates a host peer operating in response to a mobile agentconfigured to perform version control according to one embodiment. Themobile agent may travel through the network according to its itinerarywhile collecting version information from peers concerning one or moredocuments stored or accessible by the peers. In one embodiment, themobile agent may collect other information, such as file sizes, creationdates, peers that originated the documents, and other similar propertiesof data files. File information may be stored with each file. In oneembodiment, a peer may store file information with each local file ormay generate the information in response to a request from a mobileagent.

A peer may receive and determine whether to host a mobile agent, asindicated at 1810-11. The mobile agent hosted may then direct the peernode to obtain version information concerning one or more data filesaccessible by the peer node. In one embodiment, the peer node may searchfor accessible data files and select relevant data files, as indicatedat 1812. The search for accessible data files may involve all filesstored locally by the peer node or may be limited. For example, somelocal files may not be accessible or visible to the peer-to-peerenvironment for security purposes, or according to user configurationsor other configuration. The mobile agent may include data indicatingaccessible data files of interest for selection. In one embodiment, themobile agent may include one or more identifiers such as a file name, ahandle, and/or other identifier. The peer node may then select matchingdata files found by the search according to the identifier(s). Forexample, the mobile agent may include data indicating interest in fileswith a particular name extension, such as “sxi”, “doc” or “txt.” Thepeer node may then select the files found that match criteria indicatedby the mobile agent. In some circumstances, a peer node may not find anyrelevant data files, and may indicate this to the mobile agent.

To prevent modifications that would reduce the usefulness of informationcollected about selected data files, in one embodiment a peer node maywrite lock the selected data files, as indicated at 1813. A write lockmay involve accessing a property setting of a data file, for exampleconfiguring a read/write data file as read only. Version information maythen be gathered about the selected data files, as indicated at 1814. Inone embodiment, a write lock is not performed. In this embodiment, asthe file may be modified, the version information collected may notalways be accurate. In one embodiment, a write lock may also be releasedand files changed after information is collected.

The version information collected may then be stored as part of themobile agent payload, as indicated at 1815. In one embodiment, theversion information may be stored with version information alreadystored in the payload. For example, the mobile agent payload may form adatabase and collected version information may be added to the database.The data may be ordered according to one or more of size, date, versionor revision number, or other property or combination of properties. Theinformation may include data enabling a peer to retrieve a data filefrom another peer.

In one embodiment, the payload may include actual data files. The peernode hosting the mobile agent may add data files to the payload and/ormay replace files in the payload with files found locally. For example,the mobile agent may be configured to search for the latest version of aparticular data file and the payload may include an older version ofthat file if found locally. The peer node may therefore replace the filein the payload with a copy of the local file with corresponding versioninformation. In one embodiment, the mobile agent may prompt its hostpeer to send the version information or the actual files to its homepeer node directly to reduce bandwidth use and/or to provide for failuremanagement. As the data collected, whether files or version information,may be large, accumulating the data in the mobile agent may result in asignificant consumption of resources in bandwidth and storage. Moreover,if the mobile agent fails or is otherwise terminated, the home peer mayhave received at least some data and may be able to determine which peernodes the mobile agent visited. The home peer may then use a similarmobile agent with an itinerary configured to continue the work of theprevious mobile agent. In another embodiment, a mobile agent may beconfigured to return to its home peer under certain conditions so thatit may return results in smaller amounts, for example if and when themobile agent reaches a size limit or visits a particular number of peernodes.

The peer node may use the itinerary to determine a next peer to whichthe mobile agent is to be sent, and may send the mobile agent to thatnext peer, as indicated at 1817 and 1819. The home peer node of themobile agent may receive the version information collected from one ormore peers. The data may be analyzed to determine which peer stores themost up-to-date version of a data file and the home peer may thencommunicate with that peer to obtain a copy of the data file. In oneembodiment, the home peer may notify one or more other peers of the peerstoring the latest version, and the peer nodes may synchronize byupdating corresponding data files to the latest version. In oneembodiment, the home peer may send peers a copy of the latest version. Ahome peer node may use the results from the mobile agent for otherpurposes, such as cataloging files or finding backups and previousversions.

In one embodiment, peers storing files with the same or differentversions with version control may form a peer group. The membership ofthe peer group may be changed, or another peer group may be formed, inresponse to the results from the mobile agent. Mobile agent itinerariesmay be limited to visit members of one or more peer groups to makeoperations more efficient.

Digital Rights Management

Peer-to-peer platforms such as the exemplary peer-to-peer platformdescribed below may permit independent developers to write contentdistribution and/or sharing applications for copyright-sensitive datasuch as music and video. Embodiments of the system and method forimplementing mobile agents in the peer-to-peer environment may beconfigured to provide digital rights management on peers in peer-to-peernetworks. Embodiments may allow vendors or others to create and usevendor-certified mobile agents for performing digital rights managementin peer-to-peer networks. These embodiments may, for example, helpcombat copyright theft to permit legal distribution and sharing ofcopyrighted material in peer-to-peer networks.

In one embodiment, a mobile agent may include or specify a function tobe performed on visited peers. In one embodiment, the function may be anexecutable Java class. In one embodiment, the Java class may be acertified (signed) Java class. Using certified Java classes may helpprevent fraudulent mobile agents from masquerading as vendor-certifieddigital rights management mobile agents.

In one embodiment, a distributor of copyright-sensitive content for salemay distribute this content to a subscriber peer group (e.g. a peergroup implemented according to the exemplary peer-to-peer platformdescribed below) running a content sharing network module (e.g.application, service, etc.), for example, a module as described for theexemplary peer-to-peer platform. In one embodiment, each member of thepeer group that runs this module may include a mobile agent listeningservice, and may advertise the mobile agent listening service. In oneembodiment, the mobile agent listening service may be advertised with acommunications channel (e.g. pipe) advertisement such as a pipeadvertisement of the exemplary peer-to-peer platform described below.The distributor may discover or be informed of all such advertisedmobile agent listening services. In one embodiment, the distributor maybe made aware of all such advertisements via a discovery protocol suchas the discovery protocol described for the exemplary peer-to-peerplatform.

Given a set of n subscribers, each of which may be capable of sharingpurchased copyright material among other subscribers in the set, acontent distributor may launch digital rights management mobile agentswith one or more of the n subscribers on their itineraries. In oneembodiment, the itineraries may include communications channel (e.g.pipe) identifiers or other information for identifying and communicatingthe subscriber peers on the itineraries. These digital rights managementmobile agents may visit as many subscriber peers on their itineraries aspossible (e.g. those peers that are available when the mobile agentattempts to visit). The function included in or specified by the mobileagent may examine each visited peer's system, searching for copyrightedmaterial that the peer has either purchased or acquired from anotherpeer. The mobile agent may return to the content distributor with thisinformation for analysis after completing its itinerary traversal.Digital rights management mobile agents may be used by the contentdistributor in detecting and minimizing theft of copyrighted material inthe peer-to-peer supported marketplace.

In one embodiment, when a content distribution module (e.g. application,service, etc.) is downloaded by a peer, the module may include one ormore of a root certificate of the content distributor, a rootcertificate of an affiliate of the content distributor, and/or a rootcertificate of a certificate authority that has signed either thedistributor's or an affiliate's service certificate. The contentdistribution module may then be able to verify the signature of apayload of certified digital rights management mobile agents when such amobile agent visits the peer. If the root certificate was created by thedistributor or its affiliate, in one embodiment the certificate mayinclude the public key of the public/private key pair associated withthe certificate and an algorithm used for signing the payload (e.g.SHA-1 with RSA). If the certificate is a certificate authority rootcertificate, the service certificate may arrive as part of the digitalrights management mobile agent's payload, and may be signed by thecertificate authority. The service certificate may include theappropriate public key used to verify the signature of the payload.

Upon arrival at a peer, a digital rights management mobile agent may beverified as certified by validating its signature. If certified, thedigital rights management mobile agent may be permitted to run thefunction it includes or indicates to search for copyrighted material ofthe distributor associated with the digital rights management mobileagent on the peer.

FIG. 46 is a flowchart illustrating using a mobile agent to detectunauthorized copies of content according to one embodiment. As indicatedat 1820, an initiating peer node may launch a mobile agent including anitinerary of a group of peer nodes configured to receive and sharecontent from a distributor. In one embodiment, to launch a mobile agent,the initiating peer node may send the mobile agent to a first peer nodeindicated by the itinerary.

As indicated at 1822, the mobile agent may visit one or more of thesubset of the plurality of peer nodes indicated by the itinerary tocollect information on distributor content stored on the visited peernodes. In one embodiment, to collect information on distributor contentstored on the one or more visited peer nodes, the mobile agent maysearch content on each visited peer node to locate distributor contenton the peer node. In one embodiment, the information on distributorcontent located on the visited peer node may be stored in a payload ofthe mobile agent. In one embodiment, to provide the information on thedistributor content to the initiating peer node, the mobile agent mayreturn the payload to the initiating peer node after visiting the one ormore of the subset of the plurality of peer nodes indicated by theitinerary.

In one embodiment, each visited peer node may receive the mobile agentfrom a previous peer node. Information on distributor content stored onthe peer node may be stored in a payload of the mobile agent. The peernode may then send the mobile agent to a next peer node. In oneembodiment, to send the mobile agent to a next peer node, the peer nodemay determine if the mobile agent has completed the itinerary. If themobile agent has not completed the itinerary, the peer node may send themobile agent to a next peer node indicated by the itinerary. If themobile agent has completed the itinerary, the peer node may return themobile agent to the initiating peer node.

In one embodiment, the mobile agent may include authenticationinformation. Each visited peer node may access the authenticationinformation to verify the mobile agent as authorized by the distributorto collect information on distributor content stored on the peer node.In one embodiment, the authentication information may include a signedcertificate.

As indicated at 1824, the initiating peer node may examine theinformation on the distributor content provided by the mobile agent todetect unauthorized copies of the distributor content. Embodiments of amobile agent may be used in different environments to detectunauthorized copies of different types of digital content that the user(i.e. distributor or agent of the distributor) desires to control thedistribution of. For example, a distributor may use one embodiment of amobile agent to detect unauthorized copies of copyrighted content.Copyrighted content may include digital audio, video, image, text,multimedia, or any other digital, copyrightable material, or acombination thereof. Embodiments of a mobile agent may be used to detectunauthorized content other than copyrighted material. For example, amobile agent may be used by an distributed (e.g. enterprise orindividual) to detect unauthorized copies of sensitive, private, secure,and/or any other type of content that the enterprise desires to controlthe distribution of. An enterprise may be any public or privateinstitution or organization, including, but not limited to, businesses,corporations, public and private schools, governments and governmentagencies, non-profit organizations, etc.

In one embodiment, the peer nodes in the peer-to-peer network may beconfigured to implement a peer-to-peer environment according to apeer-to-peer platform such as the exemplary peer-to-peer platformdescribed below which includes one or more peer-to-peer platformprotocols for enabling the peer nodes to discover each other,communicate with each other, join peer groups, share content includingdistributor content, and send and receive mobile agents in thepeer-to-peer environment. In one embodiment, pipes implemented accordingto the peer-to-peer platform may be used to send the mobile agentbetween peer nodes on the itinerary.

FIG. 47 illustrates a host peer operating in response to a digitalrights management mobile agent according to one embodiment. The mobileagent may travel through the network according to its itinerary tosearch for copyrighted or other distributor material on one or morepeers. In one embodiment, the mobile agent may collect otherinformation, such as file property information (size, owner, etc).Copyright status and other information may be stored with each file. Forexample, a bit may be set in a file to indicate it is copyrightedmaterial, or some other mechanism may be used, such as watermarks.

A peer may receive and determine whether to host a mobile agent, asindicated at 1830 and 1831. A peer may condition its hosting a digitalrights management mobile agent upon a valid identification certificateto reduce the risk of breaching security or privacy by fraudulent mobileagents. A peer-to-peer platform enabling its peer node to participate inthe peer-to-peer network may enable mobile agents to operate on the peerwith varying levels of access depending on their credentials. Apeer-to-peer platform may enable a mobile agent to search through itshost system upon detecting a valid certificate. For example, thepeer-to-peer platform may include content distribution applications withroot certificates for the content distributor, one of its affiliates, orthe root certificate of a certificate authority. The certificateauthority may have signed the distributor or affiliate's certificate.The content distribution application may then be able to verify thesignature of the mobile agent received and thereby confirm that a mobileagent is properly certified. One or more of various algorithms (e.g.Secure Hash Algorithm-1 (SHA-1) with RSA) may be used for signing mobileagents.

The mobile agent may also have its itinerary generated from a list ofmembers of a peer group, a peer-to-peer network, or some other group ofpeer nodes. For example, the home peer node of the mobile agent may be adistributor of copyright material with a subscription list indicatingpeer nodes to which copyrighted material has been distributed. Theitinerary may be formed from this or similar subscription lists, as wellas client or user lists. Peers configured to exchange or receivecopyrighted material may form peer groups and itineraries may begenerated to reflect the membership of one or more of such peer groups.In one embodiment, nodes participating in these peer groups mayimplement a peer-to-peer platform that is configured to handle digitalrights management mobile agents.

The mobile agent may then direct the peer node to search for and collectinformation about copyrighted material stored on the peer, as indicatedat 1832. In one embodiment, the mobile agent may specify types of datafiles, and the peer may select from the copyrighted files found thosefiles that also match the criteria specified by the mobile agent, asindicated at 1833. For example, a mobile agent may be configured tocollect data regarding copyrighted files in an MP3 or movie format tolimit the amount of data. The data collected may be stored as part ofthe mobile agent payload, as indicated at 1834. In one embodiment, thedata may be stored with data already stored in the payload. For example,the mobile agent payload may include a database, and the new data may beadded to the database. In one embodiment, data in the database may beencrypted or otherwise secured to reduce the risk of breaches ofsecurity or privacy. In other embodiments, data from local peers may beencrypted or secured to reduce the possibility of third partiesaccessing that data from the mobile agent during transmission or atother nodes. The data may be ordered according to one or more propertiesof the copyrighted files, such as by alphabetical order, date, or otherproperty or combination of properties. The data may include dataenabling the home peer node of the mobile agent to determine a fileinvolved and the peer storing the file.

In one embodiment, the mobile agent may prompt its host peer to send thedata to its home peer node directly to reduce bandwidth use and/orprovide for failure management. The data transmitted may be encrypted orotherwise secured to reduce the risk of breaches of security and/orprivacy. As the data collected may be large, accumulating it in themobile agent may result in a significant consumption of resources inbandwidth and storage. Moreover, if the mobile agent fails or isotherwise terminated, the home peer may have received at least some dataand may be able to determine which peer nodes the mobile agent visited.The home peer may then use a similar mobile agent with an itineraryconfigured to continue the work of the previous mobile agent. In anotherembodiment, a mobile agent may be configured to return to its home peerunder certain conditions so that it may return results in smalleramounts, for example if and when the mobile agent reaches a size limitor visits a particular number of peer nodes.

The peer node may use the itinerary to determine a next peer to whichthe mobile agent is to be sent, and may send the mobile agent to thatnext peer, as indicated at 1836 and 1838. The home peer node of themobile agent may receive the data collected from one or more of thepeers indicated by the itinerary. In one embodiment, the home peer nodemay analyze the data gathered by the mobile agent to determine thestatus of the files found on the peer nodes the mobile agent visited. Ahome peer node may use the results from the mobile agent for otherpurposes, such as cataloguing files.

Evaluating Trust Using Mobile Agents

Embodiments of the system and method for implementing mobile agents inthe peer-to-peer environment may be configured to gather reputationinformation for peers in peer-to-peer networks, for example reputationfor content indexing. In these embodiments, a peer may evaluate otherpeers' reputations as providers of codats based on recommendations(trust evaluations) gathered by a mobile agent from a peer group forwhich content/keyword match is applicable. A keyword may indicate anarea of interest of the peer, and the peer may be a member in a peergroup with other peers that share the area of interest. Reputationinformation may be used in calculating trust in peers in the peer groupas providers of codats relevant to the area of interest. Reputationinformation may also be referred to as trust information or trustevaluations. Mobile agents may be used in disseminating, calculating,and/or updating trust in peer-to-peer networks. In one embodiment, peersin the peer-to-peer network may use a trust mechanism such as theexemplary decentralized, distributed trust mechanism described below tocalculate and/or evaluate trust in other peers using reputationinformation gathered by mobile agents.

In one embodiment, communications channels (e.g. pipes as described forthe exemplary peer-to-peer platform described below) may be used togather content/keyword evaluations and to establish groups or sub-groupsof peers for each keyword in which the initiating peer(s) indicateinterest. In one embodiment, a collection of groups or sub-groups ofpeers may determine a topological minimum for further mobile agentqueries to limit the effect of such queries on network bandwidth andoverall search performance.

In one embodiment, a mobile agent's itinerary may initially be an entirepeer group. The mobile agent may be launched by an initiating peer (e.g.sent to a first peer on the itinerary). In one embodiment, the mobileagent may include or specify a function to be performed on visitedpeers. In one embodiment, the function may be an executable Java class.In one embodiment, the Java class may be a certified (signed) Javaclass. In one embodiment, the function may be configured to accumulate areturn payload from visited peers based upon content/keyword matches onthe visited peers as determined by each visited peer's local trustinformation.

In one embodiment, to preferably minimize network bandwidth impact, themobile agent may return to its initiating peer when it has collected apredetermined amount of payload. If a mobile agent returns to itsinitiating peer after collecting a predetermined amount of payload andbefore all peers on the itinerary have been visited, the mobile agentmay include a truncated itinerary including those peers it has not yetvisited. The payload may be emptied and the mobile agent may continueits peer group traversal using the truncated itinerary until thepredetermined amount of payload has been collected from the visitedpeers on the truncated payload. This may continue until the itineraryhas been completed or, in one embodiment, until peers on the itinerarywhich the mobile agent cannot contact to visit do not respond for apredetermined time-to-live metric for the mobile agent to search for andcollect trust information for peers in the peer group. For example, thetime-to-live may be set to 30 minutes.

In one embodiment, as the mobile agent traverses the peer group, eachpeer on the itinerary that the mobile agent is to visit has a “time tolive.” If the time to live expires for a peer before it is successfullyvisited, no further attempts to visit the peer will be made by themobile agent. Peers that are not successfully visited within the “timeto live” may have their reputation downgraded for having too high a riskfor further interest. Once the peer group has been traversed by themobile agent, those peers whose reputation is high enough may form acooperative sub-group of peers for the next traversal by a mobile agentfrom an initiating peer. The collection of such sub-groups may be usedas the basis for peers' content access.

FIG. 48 is a flowchart illustrating a peer node using a mobile agent tocollect trust evaluations from a plurality of peer nodes according toone embodiment. As indicated at 1840, an initiating peer node in apeer-to-peer network may launch a mobile agent on the peer-to-peernetwork. The mobile agent may include an itinerary indicating aplurality of peer nodes in the peer-to-peer network to be visited by themobile agent, and may include an indication of an area of interest ofthe initiating peer node. As indicated at 1842, the mobile agent maycollect trust evaluations for a subset of the plurality of peer nodes asproviders of codats relevant to the area of interest from one or more ofthe plurality of peer nodes indicated by the itinerary. In oneembodiment, a codat is computer-representable content or data.

In one embodiment, the mobile agent may visit each of the plurality ofpeer nodes indicated by the itinerary to collect the trust evaluations.At each visited peer node, the mobile agent may determine if the visitedpeer node stores one or more trust evaluations for one or more of theplurality of peer nodes as providers of codats relevant to the area ofinterest. If the visited peer node stores one or more of the trustevaluations, the trust evaluations may be stored as payload data in themobile agent. After completing the itinerary, the mobile agent mayreturn the payload to the initiating peer node.

In one embodiment, if the stored payload data has reached a size limit,the mobile agent may return to the initiating peer node where thepayload data may be removed from the mobile agent and stored on theinitiating peer node. If there are more peer nodes on the itinerary thathave yet to be visited, the initiating peer node may send the mobileagent to a next peer node on the itinerary. If the stored payload datahas not reached a size limit and there are more peer nodes on theitinerary to be visited, the mobile agent may be sent to the next peernode on the itinerary. If there are no more peer nodes on the itinerary,the mobile agent may be returned to the initiating peer node.

In one embodiment, if the mobile agent is unable to visit one of thepeer nodes indicated by the itinerary (for example, if the peer node isunavailable to be contacted by a peer node on the itinerary to receivethe mobile agent), the initiating peer node may reduce a trustevaluation for the peer node that the mobile agent was not able to visitas a provider of codats relevant to the area of interest, as the peernode is considered unreliable. In one embodiment, the mobile agent maytry one or more times to reach the peer node before “giving up” on thepeer node. In one embodiment, the mobile agent may retry reaching thepeer node until a time limit has expired.

As indicated at 1844, after receiving the trust evaluations collected bythe mobile agent, the initiating peer node may determine a trustevaluation for each of the subset of the plurality of peer nodes asproviders of codats relevant to the area of interest from the trustevaluations collected by the mobile agent. In one embodiment, theinitiating peer node determines a trust evaluation for each of thesubset of the plurality of peer nodes as a provider of codats relevantto the area of interest from the trust evaluations collected by themobile agent and previous trust evaluations of the subset of theplurality of peer nodes as providers of codats relevant to the area ofinterest stored on the initiating peer node. In one embodiment, theinitiating peer node may then select one or more of the subset of peernodes for which corresponding trust evaluations are above a cooperationthreshold as providers of codats relevant to the area of interest. Inone embodiment, the initiating peer node and the selected one or more ofthe subset of peer nodes may form a peer group or sub-network forsharing codats relevant to the area of interest. Mobile agentssubsequently launched by the initiating peer node may include the memberpeer nodes of this peer group or sub-network in their itinerary.

In one embodiment, the peer nodes in the peer-to-peer network may beconfigured to implement a distributed trust mechanism such as theexemplary distributed trust mechanism described below for establishingand maintaining trust relationships among the peer nodes in areas ofinterest from trust evaluations of codat exchange among the peer nodesin the area of interest. In this embodiment, determining a trustevaluation for each of the subset of the plurality of peer nodes as aprovider of codats relevant to the area of interest from the trustevaluations collected by the mobile agent may be performed in accordancewith the distributed trust mechanism.

In one embodiment, the peer nodes in the peer-to-peer network may beconfigured to implement a peer-to-peer environment according to apeer-to-peer platform such as the exemplary peer-to-peer platformdescribed below which includes one or more peer-to-peer platformprotocols for enabling the peer nodes to discover each other,communicate with each other, find and exchange codats, and send andreceive mobile agents in the peer-to-peer environment. In oneembodiment, pipes implemented according to the peer-to-peer platform maybe used to send the mobile agent between peer nodes on the itinerary.

FIG. 49 illustrates a host peer operating in response to a mobile agentconfigured to gather reputation information according to one embodiment.The mobile agent may travel through the network according to itsitinerary while collecting data from peers. The mobile agent may alsohave its itinerary generated from a list of members of a peer group, apeer-to-peer network, or some other group of peer nodes indicating theyare configured to provide or store reputation information. Peer groupsmay be formed according to areas of interest, so to remain in a peergroup peers may maintain a high reputation or level of trust. Peers maystore local trust information including local content/keyword data, asindicated at 1850, corresponding to one or more areas of interest. Forexample, a peer may store information about particular subjects, such aswine, travel, etc, and may maintain store reputation corresponding tothose areas of interest. In one embodiment, peers participating in peergroups for reputation information may use a peer-to-peer platformconfigured to maintain or provide reputation information for mobileagents such as the exemplary peer-to-peer platform described below.

A peer may receive and determine whether to host a mobile agent, asindicated at 1851-52, for example as described for FIG. 41. The hostedmobile agent may then direct the peer node to gather reputationinformation. In one embodiment, the peer node may search local trustinformation and local content/keyword data, as indicated at 1853. Thepeer node may then collect the information for the mobile agent, asindicated at 1854. In one embodiment, the mobile agent may specify othercriteria, for example identifying one or more areas of interest orrefining the search within an area of interest, so that the peer nodemay discriminate when collecting data. In one embodiment, a search maybe performed that is tailored to perform the discrimination and returnappropriate results matching criteria indicated by the mobile agent. Thepeer may then store the information collected as part of the mobileagent payload, as indicated at 1855. In one embodiment, data may beformatted to be stored with other data already stored in the payload.For example, the mobile agent payload may form a database, and collectedsearch information may be added to maintain the structure of thedatabase. The data may also be formatted according to particularconfigurations, for example as codats. The term “codat” as used hereinrefers to any computer content—code, data, applications, or othercollection of computer representable resources.

In one embodiment, the mobile agent may prompt its host peer to send thesearch information or the actual files to its home peer node directly toreduce bandwidth use and/or provide for failure management. As datacollected may be large, accumulating it in the mobile agent may resultin a significant consumption of resources in bandwidth and storage.Moreover, if the mobile agent fails or is otherwise terminated, the homepeer may have received at least some data and may be able to determinewhich peer nodes the mobile agent visited. The home peer may then use asimilar mobile agent with an itinerary configured to continue the workof the previous mobile agent. In another embodiment, a mobile agent maybe configured to return to its home peer periodically so that it mayreturn results in smaller amounts, for example each time the mobileagent reaches a size limit or visits a number of peer nodes. In oneembodiment, a size limit of four kilobytes of payload may be appropriatefor most bandwidth.

The peer node may use the itinerary to determine a next peer to which tosend the mobile agent and send the mobile agent to that next peer, asindicated at 1856-58, for example as described for FIG. 41. The homepeer node of the mobile agent may receive the version informationcollected from one or more peers. The data may be analyzed to determinewhich the overall reputation of the peers. In one embodiment, the homepeer may notify its peers of results. The peer group membership maychange according to the results to include peers with higher levels ofreputation or trust. In one embodiment, new peer groups may be formedaccording to the results. The home peer node may initiate the peer groupoperations.

Distributed Trust Mechanism

Embodiments of a decentralized, distributed trust mechanism aredescribed that may be used in various networking platforms, including,but not limited to, peer-to-peer and other decentralized networkingplatforms. The mechanism may be used, among other things, to implementtrust relationships between and among peers and to implement trustrelationships between peers and content and data (codat). Protocols andmethods may be provided for disseminating and updating trust. Forparticipating peers, trust may be biased towards data relevance, e.g.the quality of recipes in a cooking peer group in some embodiments.Trust may have multiple components or factors, and embodiments of thedecentralized trust mechanism may provide for the inclusion of factorsof trust based on a peer group's interests and/or group contentrelevance.

The term “codat” as used herein refers to any computer content—code,data (static and dynamic), documents, applications, certificates, or anyother collection of computer-representable resources. Examples of codatmay include, but are not limited to: text files, photographs, applets,executable files, serialized Java objects, SOAP messages, certificates,etc. Codat may also include abstractions, for example, routes or pathsin a network.

Embodiments of this decentralized trust mechanism may be used for avariety of applications. One exemplary application of this trustmechanism may be to perform reputation-guided searching. Anotherexemplary application of the trust mechanism may be to build arecommendation system for security purposes. In general, embodiments maybe used for applications in which trust may be based on the norm forsocial interaction between participating peers.

FIG. 50A illustrates trust relationships between peers and between peersand codat according to one embodiment. The trust mechanism may include acodat trust component that may be used in collecting informationassociated with a group's interests. In order to evaluate trust withrespect to a peer 200B's interests, the peer's interests may berepresented as one or more keywords 406. A user (i.e. of the peer 200B)may evaluate trust in a codat 500 to build a trust relationship for peer200B with that codat. In one embodiment, the peer 200B may receive codat500 from another peer 200A and may evaluate trust with respect to thepeer's interest in the received codat 500. This evaluation may be made,for example, using search results (e.g. relevance) and user evaluation(e.g. user rating of the codat 500 using a GUI), and may generate orupdate codat confidence 408 in the received codat 500. In oneembodiment, peer confidence 410 in the providing peer may be used indetermining codat confidence 408. In one embodiment, the codat 500 maybe received from a providing peer over a path of one or more other peers200, and peer confidences 410 in the one or more providing peers may beused in determining codat confidence 408.

The results of the interest evaluation on the codat received from peer200A, codat confidence 408, may then be used to evaluate peer 200B'strust in peer 200A (trust is a function of peer confidence 410 andpossibly one or more other factors) as a source for codat 500corresponding to one or more keywords 406 which represent areas ofinterests 506 of the peer 200B. Thus, evaluations of trust on a peer(for codat, paths, other peers, etc.) may be based on content andrelative to areas of interest. From a user's perspective, rating codat500 may be generally easier than rating a peer 200. Note that peer 200Amay perform a similar trust evaluation of peer 200B.

The codat trust component is based on content, and differs from thetraditional trust concept based on risk, which may be identified as therisk trust component. The risk trust component's value may be determinedby one or more factors including, but not limited to: codat integrity(e.g., the codat contained a virus as noted by a virus pre-processor),peer accessibility (is the peer up most of the time), and peerperformance (long delays in retrieving data).

On a network comprising a plurality of peer nodes, each peer may build atrust relationship with one or more of the other peers to form a “web oftrust” as illustrated in FIG. 50B according to one embodiment. Each peer200 may belong to one or more peer groups 210. Each peer group 210 maybe formed or joined based upon a particular area of interest, which maybe represented by a particular keyword. In one embodiment, a peer group210 may be associated with two or more areas of interests, and thuskeywords. In one embodiment, two or more peer groups may be associatedwith the same area of interest, and thus keyword. Peers 200 may exchangecodat relevant to an area of interest within a peer group (or, in oneembodiment, with peers 200 outside the peer group), determine codatconfidence in the codat, and determine peer confidences relative to thearea of interest for the providing peers using the codat confidences incodat relevant to the area of interest received from the peers 200.Trust relationships between peers 200 thus may be based on content (thecodat trust component) instead of or in combination with the risk trustcomponent. Peers 200 may also propagate codat confidence and peerconfidence information to other peers 200.

In one embodiment, a peer, for example peer 200D, may receive codat fromanother peer, for example peer 200C, via one or more intermediary peers200. In this example, there are two paths between peer 200C and peer200D, one through peers 200A and 200B, and one through 200B. In oneembodiment, a codat confidence may be determined using confidenceinformation for the path, which may include peer confidences 410 inpeers on the path.

In general, peers 200 are not necessarily members of all peer groups210, and new peers 200 may not initially belong to any peer group 210.In one embodiment, since peer group membership may be motivated bykeyword/interest, peers 200 that are not members of a particular peergroup 210 may be allowed to retrieve peer confidence information fromthe peer group 210 to use as initial peer confidence information for thepeer group 210. In one embodiment, peers 200 that are not members of aparticular peer group 210 may also be allowed to retrieve codatconfidence information from the peer group 210.

FIG. 51 illustrates a typical computer system that is suitable forimplementing various embodiments of the decentralized trust mechanism onpeers or other systems as described herein. Each computer system 180typically includes components such as a processor 182 with an associatedcomputer-accessible memory medium 184. Processor 182 may include one ormore processors, such as a Sparc, X86 (Pentium), PowerPC, or Alphaprocessor. Computer-accessible memory medium 184 may store programinstructions for computer programs, wherein the program instructions areexecutable by processor 182. The computer system 180 may further includea display device such as a monitor, an alphanumeric input device such asa keyboard, and a directional input device such as a mouse. Computersystem 180 is operable to execute the computer programs to implement thedecentralized trust mechanism as described herein.

The computer system 180 may further include hardware and programinstructions for coupling to a network 106. The network 106 may be anyof a variety of networks including, but not limited to, the Internet,corporate intranets, dynamic proximity networks, home networkingenvironments, LANs and WANs, among others, and may include wired and/orwireless connections. The network 106 may implement any of a variety oftransport protocols or combinations thereof, including, but not limitedto, TCP/IP, HTTP, Bluetooth, HomePNA, and other protocols.

Computer system 180 typically includes a computer-accessible memorymedium 184 on which computer programs according to various embodimentsmay be stored. The term “computer-accessible memory medium,” which maybe referred to herein as “memory,” may include an installation medium,e.g., a CD-ROM, DVD or floppy disks, a computer system memory such asDRAM, SRAM, EDO DRAM, SDRAM, DDR SDRAM, Rambus RAM, etc., or anon-volatile memory such as a magnetic media, e.g., a hard drive, oroptical storage, or a combination thereof. The memory 184 may includeother types of memory as well, or combinations thereof. In addition, thememory 184 may be located in a first computer in which the programs areexecuted, or may be located in a second different computer that connectsto the first computer over a network. In the latter instance, the secondcomputer provides the program instructions to the first computer forexecution. The instructions and/or data according to various embodimentsmay also be transferred upon a carrier medium. In some embodiments, acomputer readable medium may be a carrier medium such as network 106and/or a wireless link upon which signals such as electrical,electromagnetic, or digital signals may be conveyed.

In addition, computer system 180 may take various forms, including apersonal computer system, server, workstation, cell phone, pager, laptopor notebook computer, smart appliance, network appliance, Internetappliance, personal digital assistant (PDA), set-top box, televisionsystem, mainframe computer system, and even supercomputer or otherdevice. In general, the term “computer system” can be broadly defined toencompass any device having a processor that executes instructions froma computer-accessible memory medium.

In one embodiment, the memory 184 may store software programs and/ordata for implementing a decentralized trust mechanism as describedherein. In one embodiment, the memory 184 may further store softwareprograms and/or data for implementing a peer 200 for participating in apeer-to-peer environment with other peers 200 (implemented on othercomputer systems 180) on network 106. The software program(s) may beimplemented in any of various ways, including procedure-basedtechniques, component-based techniques, and/or object-orientedtechniques, among others. For example, the software program may beimplemented using ActiveX controls, C++ objects, JavaBeans, MicrosoftFoundation Classes (MFC), or other technologies or methodologies, asdesired. A CPU, such as the host processor 182, executing code and datafrom the memory medium 184 includes a means for creating and executingthe software program or programs according to the methods and/or blockdiagrams described herein.

An exemplary peer-to-peer platform for enabling computer systems 180 toparticipate as a peer 200 in a peer-to-peer environment, and in or withwhich embodiments of the decentralized trust mechanism may beimplemented, is described later in this document. It is noted thatembodiments may also be implemented in other peer-to-peer environmentsimplemented in accordance with other peer-to-peer mechanisms. It isfurther noted that, although embodiments as described herein aregenerally described in reference to peers and peer-to-peer networkingenvironments, embodiments may also be implemented on other systems andin other architectures including other networking architectures andenvironments, for example client-server systems.

In one embodiment, the memory 184 may store one or more codat 500. Peer200A may participate in the peer-to-peer environment with one or moregroups of peers 200. The peer 200A may have one or more areas ofinterests 506 and may choose to participate in particular peer groupsconcerned with particular areas of interest 506. Codat 500 may beclassified according to areas of interest 506. In one embodiment, aparticular codat 500 may be classified in more than one area of interest506. Memory 184 may also store one or more keywords 406 each associatedwith a particular area of interest 506. Memory 184 may also store one ormore codat confidences 408 and one or more peer confidences 410. Eachcodat confidence 408 may represent the peer 200A's trust or confidencein a particular codat 500. Memory 184 may also store one or more peerconfidences 410. Each peer confidence 410 may represent the peer 200A'strust in a particular peer 200. In one embodiment, trust mechanism 510may be executable to determine or adjust a peer confidence 410associated with a particular peer 200 using one or more codatconfidences 408 associated with codat 500 received from the particularpeer. Embodiments of methods for calculating codat confidence 408 andpeer confidence 410 are described later in this document. While trustmechanism is illustrated as being a component or module integrated inpeer 200, in some embodiments trust mechanism 510 may be a stand-alonemodule or program external to peer 200.

In one embodiment, the computer programs executable by the computersystem 180 may be implemented in an object-oriented programminglanguage. In an object-oriented programming language, data and relatedmethods can be grouped together or encapsulated to form an entity knownas an object. All objects in an object-oriented programming systembelong to a class, which can be thought of as a category of like objectsthat describes the characteristics of those objects. Each object iscreated as an instance of the class by a program. The objects maytherefore be said to have been instantiated from the class. The classsets out variables and methods for objects that belong to that class.The definition of the class does not itself create any objects. Theclass may define initial values for its variables, and it normallydefines the methods associated with the class (i.e., includes theprogram code which is executed when a method is invoked.) The class maythereby provide all of the program code that will be used by objects inthe class, hence maximizing re-use of code that is shared by objects inthe class.

In one embodiment, an API may be provided for developing graphical userinterfaces (GUIs) for codat user rating. Implicitly, a user may be ableto perceive how well retrieved codat fits the search criteria. This goesbeyond simple keyword match, and rating information may be provided byuser input to the GUI, and may in one embodiment serve as auser-supplied factor of the codat confidence relevance metric.

FIG. 52 illustrates an exemplary architecture of a peer 200 (which alsomay be referred to as a peer node of a network) implementing a trustmechanism according to one embodiment. In one embodiment, a peer 200 mayinclude a trust mechanism 510 which may include one or more codatconfidence tables 400 which each may include one or more codatconfidences, and one or more peer confidence tables 402 which each mayinclude one or more peer confidences. In one embodiment, there may beone peer confidence table 402 for each peer group of which peer 200 is amember. In one embodiment, peer 200 may include a peer group independentpeer confidence table 404 which may include one or more peer confidencescorresponding to the peers in the peer groups in which peer 200 is amember peer.

Peer 200 may include codat 500. Codat 500 may be classified by area ofinterest 506 of peer 200. Each area of interest 506 may correspond to aparticular keyword 406. Peer 200 may determine confidence in codat 500and record the codat confidences in codat confidence table 400. Codatconfidences for codat received from another peer in a particular area ofinterest represented by a keyword 406 may be used to determine or adjustpeer 200's peer confidence in the other peer. The peer confidence may berecorded or updated in the peer confidence table 402 corresponding tothe peer group in which both peer 200 and the other peer are memberpeers. The peer confidence may also be recorded or updated in the peergroup independent peer confidence table 404.

In one embodiment, peer trust may be a function of peer confidence andrisk. In one embodiment, peer 200 may also include one or more peer risktables 412 which each may include one or more peer risks each associatedwith a particular peer. Peer risk for a particular peer may bedetermined using one or more factors including, but not limited to,codat integrity (e.g., did codat received from the peer contain a virusas noted by a virus pre-processor), peer accessibility (is the peer upmost of the time?), and peer performance (e.g. are there long delays inretrieving data from the peer?). Entries in peer risk tables 412 may beused in evaluating a peer's risk trust component. In one embodiment, thepeer confidence and risk tables may be used in determining if a targetpeer is able to cooperate and is thus trustworthy.

FIG. 53A illustrates a codat confidence table 400 according to oneembodiment. For each keyword 406 representing an interest of the peer,there may be one or more codat confidences 408 each corresponding to acodat 500 classified under the particular interest 506 represented bythe keyword 406. Each codat confidence 408 may indicate a confidencevalue of the peer 200 in the corresponding codat 500. In one embodiment,codat confidence tables 400 may be used in determining and/or adjustingpeer confidences 410. In one embodiment, codat confidence tables 400 maybe searched by keyword 406 when searching for codat 500.

In one embodiment, codat 500 may be associated with peer groups, and apeer 200 may include a codat confidence table 400, for example asillustrated in FIG. 53A, for each peer group of which the peer 200 is amember peer, that may be used to record the (keyword, codat)relationships for peers in the particular peer group.

In one embodiment, there may be a peer confidence table 402 asillustrated in FIG. 53B that includes peer confidence information forthose peers for which the peer 200 has (keyword, codat) information. Ina peer confidence table 402, for each keyword 406 representing aninterest of the peer 200, there may exist one or more peer confidences410 each corresponding to a particular peer that provided a particularcodat 500. In one embodiment, there may be a separate peer confidencetable 402 for each peer group in which the peer 200 is a member peer. Inone embodiment, the peer confidence table(s) 402 may be included incodat confidence table(s) 400 as illustrated in FIG. 53A. In oneembodiment, peer confidence tables 402 may be used when searching for acodat 500.

In one embodiment, there may be a peer confidence table 404 thatincludes peer confidence information for peers across all the peergroups to which the peer 200 belongs, as illustrated in FIG. 53C. Thistable 404 may be used, for example, in calculating peergroup-independent peer confidence values.

In one embodiment, the decentralized trust mechanism may use datastructures such as object-oriented programming language classes torepresent the different trust components. In one embodiment, the classesmay include a codat confidence class, a peer confidence class, and arisk class.

In one embodiment, a codat confidence class may be used in evaluatingthe codat trust component according to a keyword. In one embodiment, thecodat confidence class may include, but is not limited to, keyword,codat identifier, local flag, and confidence value as elements of theclass. In one embodiment, the confidence value may have two metrics:popularity, and relevance to keywords. Popularity may be monotonicallyincreasing and may be incremented at the provider each time the codat isrequested. The relevance may be in a range of relevance values, and maybe in a range, for example (−1, 0, 1, 2, 3, 4) in one embodiment, asdescribed below. The codat confidence class may be instantiated toimplement codat confidence 408 as illustrated in FIGS. 50A and 51.

A peer confidence class may be used in evaluating the codat peer trustcomponent according to a keyword. In one embodiment, the peer confidenceclass may include, but is not limited to, class keyword, peer identifierand confidence value as elements of the class. In one embodiment, inaddition to the codat confidence metrics above, the running average ofthe popularity of each codat accessed from this peer for a given keywordmay also be kept. The peer confidence class may be instantiated toimplement peer confidence 410 as illustrated in FIGS. 50A, 50B and 51.

In one embodiment, trust may be a function of peer confidence and risk.A risk class may be used in evaluating a peer's risk trust component. Inone embodiment, the risk class may include, but is not limited to, peeridentifier, integrity of the codat, accessibility and performance.

In one embodiment, the peer confidence and risk classes may be used indetermining if another peer, for example a peer offering to providecodat in a particular area of interest, is able to cooperate and is thustrustworthy.

The above describes how two components of trust relationships,confidence and risk, map to hardcoded information. The followingdiscusses embodiments of mechanisms for the calculation and propagationof such information to form a complex chain of relationships, anddescribes embodiments of methods to rate a propagated degree of trust.

In one embodiment, a trust value may be assigned to a peer. FIG. 54illustrates one embodiment of a table 420 of trust values 422 and thesignificance of or meaning 424 corresponding to the trust values 422. Inthe embodiment illustrated in FIG. 54, a peer may have a trust value of−1, 0, 1, 2, 3, or 4. Note that other embodiments may use other trustvalues and/or meanings corresponding to the trust values.

In the exemplary embodiment illustrated in FIG. 54, for the trust valuesof 0 and −1, the associated codat is never accessed. In one embodiment,the trust value may be propagated through a transaction pipe (which maybe described as a path). In one embodiment, the trust value of a targetfor a single path, V_(path)(T), from peer S to peer T through peersP_(i), (i=1, 2, . . . , n) may be calculated as in the followingformula:

$\begin{matrix}{{V_{path}(T)} = {\frac{1}{4n}\left( {\sum\limits_{i = l}^{n}\;{V\left( P_{i} \right)}} \right) \times {V(T)}}} & \left. 1 \right)\end{matrix}$Here, V(P_(i)) is the trust value of the peer, P_(i), who provides theinformation. In the exemplary embodiment illustrated in FIG. 54,V(P_(i)) is one of 1, 2, 3, or 4. V(T) is the trust value on the targetpeer, T. Note that in other embodiments other formulas for calculatingV_(path)(T) may be used.

For multiple paths, in one embodiment the final trust value may be theaverage of all the propagated trust values. As an example, assume thereare two paths from peer A to peer D. The first path is through peer Band C, the second one is though B, E and F. C trusts D with a value of3, B trusts C as a recommender with a value 2, and A trusts B asrecommender with a value of 3. Thus:

$\begin{matrix}{{V_{1}(D)} = {{\frac{{V(B)} + {V(C)}}{8} \times {V(D)}} = {{\frac{3 + 2}{8} \times 3} = 1.88}}} & \left. {1'} \right)\end{matrix}$

Using the same method, assume the trust value of the second path V₂(D)is 2.15. In this example, the trust value A gives D is the average oftwo paths, 2.01. In one embodiment, in addition to the propagation oftrust information, reputation may also be initialized and updated. (Notethat the values calculated in these and other examples herein may berounded or truncated for simplicity, but in application may or may notbe rounded or truncated.)

In one embodiment of the trust mechanism, there may be two values forpeer confidence and codat confidence. The codat confidence value is theinformation to be propagated and the peer confidence value is thecarrier information to be used for weighting. In one embodiment,equation 1) may be transformed as follows, where the codat confidenceand peer confidence are the relevance metrics for codat within a givenpeer group:

$\begin{matrix}{{{codat}\mspace{14mu}{confidence}_{path}} = {\frac{1}{4n}\left( {\sum\limits_{i = l}^{n}{{peer}\mspace{14mu}{{confidence}\left( P_{i} \right)}}} \right) \times {codat}\mspace{14mu}{confidence}}} & \left. 2 \right)\end{matrix}$

Propagation of confidence values may be employed when requestinginformation remotely and successfully. In one embodiment, when a remoterequest for information succeeds, the provider sends the codatconfidence object to the requester. If after computing codatconfidence_(path), the requester wants the codat, then the codat may besent to the requester (or alternatively the requester may access thecodat remotely). Even if the codat transfer (or access) occurs betweenP₁ and P_(n), the codat confidence_(path) remains as if the data wasreceived through the pipe. In one embodiment, propagation may also beemployed when giving feedback to codat providers. The updated codatconfidence object from a requester may be propagated back to theprovider. Note that in other embodiments other formulas for calculatingcodat confidence_(path) may be used.

When updating trust value, each peer may update several (e.g. three)kinds of confidence tables. In addition, the updates may be based on apeer's rating as well as on the feedback rating. Trust value updatingmay be illustrated using some examples. As one example of trust valueupdating, a peer may update its codat confidence using its own ratingand the codat confidence propagated from remote peers. The propagatedpopularity may be, for example, a running average. This example focuseson the confidence and quality updating. In one embodiment, a new codatconfidence may be a function of the old codat confidence, the propagatedcodat confidence, and the user rating:

-   -   new codat confidence=F(old codat confidence, propagated codat        confidence, user rating)

The following is an exemplary function that may be used to calculate anew codat confidence in some embodiments:new codat confidence=(a×old codat confidence)+(b×propagated codatconfidence)+(c×user rating)  3)where (a+b+c)=1.0, and a, b and c are nonnegative real numbers. a, b andc may be used as weights for relative importance of the old codatconfidence, the propagated codat confidence, and the user rating,respectively, when calculating new codat confidence. Note that in otherembodiments other formulas for calculating new codat confidence may beused.

In one embodiment, the user's personal rating may be the most importantcriteria for a user, and thus c may be given more weight (e.g. c=0.70).In one embodiment, if the new popularity value is greater than the oldpopularity value, then the propagated codat confidence may be given moreweight (e.g. a=0.10 and b=0.20); if the new popularity value is lessthan the old popularity value, the old codat confidence may be givenmore weight (e.g. a=0.20 and b=0.10). If they are equal, the old codatconfidence and the propagated codat confidence may be given equalweight. Thus, using weights, more popular codat may be given an edge.Note that other schemes for distributing weights may be used in otherembodiments.

In one embodiment, the user rating may be received as user input. It ispossible that neither the old codat confidence nor the propagated codatconfidence is available. In this case, the old codat confidence and thepropagated codat confidence may be preset, for example, to 1. A similarrule may be applied to one or more of the other exemplary functionsherein.

As another example of trust value updating, a peer may update an oldcodat confidence using feedback. The peer may have a peer confidencecorresponding to the peer who provided the feedback. In one embodiment,a feedback may be defined as a reverse-propagated codat confidence fromanother peer. In one embodiment, a new codat confidence may be afunction of the old codat confidence, the feedback, and the peerconfidence corresponding to the peer that provides the feedback:

-   -   new codat confidence=F(old codat confidence, feedback, peer        confidence of feedback peer)

The following is an exemplary function that may be used to calculate anew codat confidence in some embodiments:

$\begin{matrix}{{{new}\mspace{14mu}{codat}\mspace{14mu}{confidence}} = \frac{\left( {{{old}\mspace{14mu}{codat}\mspace{14mu}{confidence}} + \left( {{feedback} \times \frac{{peer}\mspace{14mu}{confidence}_{{feedback}\mspace{14mu}{peer}}}{4}} \right)} \right)}{2}} & \left. 4 \right)\end{matrix}$

In at least some cases, the peer may not have peer confidence for thepeer who provides the feedback, so the peer confidence in the feedbackpeer may be preset, for example, to 1. Note that in other embodimentsother formulas for calculating new codat confidence may be used.

In yet another example of trust value updating, a peer may update thepeer confidence of an information provider in a peer group. In thisexample, the peer may not receive information from other peers on aprovider's performance. Instead, the peer may itself generate an opinionof the provider, associated with one or more keywords. The peer may knowthe codat confidence, relevance metric of the codat the provider hasprovided to the peer. In one embodiment, a new peer confidence may be afunction of the old peer confidence and the set of codat confidencesrelated to the provider:

-   -   new peer confidence=F(old peer confidence, set of codat        confidences related to the provider)

The following is an exemplary function that may be used to calculate anew peer confidence in some embodiments:

$\begin{matrix}{{{new}\mspace{14mu}{peer}\mspace{14mu}{confidence}} = \frac{\mspace{11mu}{{{old}\mspace{14mu}{peer}\mspace{14mu}{confidence}} + {\frac{1}{K}{\sum\limits_{a \in K}{{codat}\mspace{14mu}{confidence}_{provider}}}}}}{2}} & \left. 5 \right)\end{matrix}$where |K| is the number of keywords a in K related to the provider. Notethat in other embodiments other formulas for calculating new peerconfidence may be used.

The trust mechanism may employ numerous updating functions, and in oneembodiment, a Bayesian approach may be used. Using a Bayesian approach,current data may be used to derive what the a posteriori model lookslike.

To make these trust values more meaningful for users, one embodiment mayinclude a cooperation threshold. If a peer confidence valuecorresponding to another peer is greater than the cooperation threshold,the other peer may be considered cooperative. Otherwise, the other peermay be considered uncooperative, and the user of the peer may decidethat interaction with the other peer may involve too much risk. Thecooperation threshold may be calculated based on the risk value, thecodat confidence value(s) and an importance value. The importance valuemay be used to indicate how important the cooperation is to the user. Auser may be willing to take a risk, i.e., override the trust mechanism'srecommendation, even though the peer confidence may be low. In oneembodiment, the importance may have a value of, for example, (−1, 0, 1,2, 3, 4) and may be input by users through a GUI. In one embodiment, theimportance value may be initially set to a default, e.g. 2. In oneembodiment, the risk value may be in a range from, for example, 0 to 4,where 0 implies no risk and 4 implies maximum risk. In one embodiment,the risk value may be statistically computed using peer accessibilityand performance information. In one embodiment, a network quality ofservice study method may be adopted to compute the risk value.

In one embodiment, if the following comparison is true, then thecooperation threshold is met:

$\begin{matrix}{\left( {{peer}\mspace{14mu}{confidence} \times {importance}} \right) > \frac{{Risk}_{peer}}{\frac{1}{K}{\sum\limits_{a \in K}{{codat}\mspace{14mu}{confidence}_{peer}}}}} & \left. 6 \right)\end{matrix}$

Here, K is the set of all keywords, a, for the given peer for whichthere are codat confidence values across all peer groups, and |K| is thenumber of such keywords. The codat confidence values corresponding tothe peer (related to a particular keyword k) may be used to representthe experienced confidence in the peer. Assuming the importance isconstant, if the risk is high and the experience is not good, thethreshold will tend to be high. In this case, the peer confidence maynot be higher than the threshold. Note that in other embodiments othercomparisons for determining if the cooperation threshold is met may beused.

Security and the Trust Mechanism

Security may address privacy, authentication, integrity, and/ornon-repudiation. Various cryptographic techniques and protocols may beimplemented, for example, to attempt to guarantee that a conversation isprivate, to authenticate a user, to insure the integrity of data, and toassure that a transaction cannot be repudiated by its originator.

To the above cryptographic list, secure access to codat, orauthorization, may be added. Codat may include static as well as dynamicor executable data, which may be locally or remotely stored. Codat mayalso include abstractions such as routes or paths codat might take in anetwork, some of which may be privileged. In one embodiment, theauthorization mechanism described herein may not be a specificauthorization solution, but instead may be an open mechanism that allowsthe implementation of various secure codat access schemes based on themechanism. The trust mechanism may be a mechanism for peer-to-peerdistributed security in which some or all of the above security featuresmay be deployed, if desired.

In one embodiment, the trust mechanism may provide a trust spectrum asillustrated in FIG. 55 that has Certificate Authority signedcertificates 700 at or near one endpoint, and self-signed certificates702 at or near the other. In one embodiment, the trust mechanism may notrequire a true, distributed Public Key Infrastructure (PKI), but rathermay provide for the creation of a trust spectrum that neither requiresnor prohibits the presence of a PKI. At what point of trust in thespectrum a peer group chooses to communicate may be up to theparticipants in that group. A peer may belong to two or more differentpeer groups each implementing a different security model on differentlevels of the trust spectrum. In a trust spectrum, unique peeridentities may be established to enable authentication and theassignment of the peers' associated access policies within a peer group,e.g., authentication and authorization.

In embodiments of the trust mechanism, a method may be provided forcreating and distributing signed certificates in a peer-to-peer networkSome embodiments may provide a mechanism for creating and distributingpublic keys given a peer-generated, private-public key pair. In someembodiments, certificate creation may include using a CertificateAuthority whose signature appended to a certificate guarantees thecertificate's content for any recipient that has secure access to theCertificate Authority's public key. In one embodiment, the CertificateAuthority's public key may be included in a root certificate on therecipient's system.

In an embodiment, any peer, including a recognized CertificateAuthority, may join a peer group and offer its services (assuming itmeets membership requirements, if any). The peer group members mayassign a level of trust or peer confidence to that peer, as well as toeach other. Mobile credentials, e.g. how to make a system's privatesecurity credentials securely available, may also be provided.

In some embodiments, peer-to-peer zero-dollar-cost certificates may beprovided. In one embodiment, peer-to-peer zero-dollar-cost certificatesmay include self-signed certificates that may be exchanged betweenpeers. In one embodiment, peer-to-peer zero-dollar-cost certificates mayinclude certificates signed or cosigned by a trusted third party (e.g. atrusted peer in a peer group). In one embodiment, the trust mechanismmay not prohibit very strong security, e.g., strong security mechanismssuch as may be used on the Internet.

Users of self-signed certificates may be left open to “imposter in themiddle” attacks. For example, if a peer A receives a peer B'sself-signed certificate in a security advertisement corresponding topeer B, peer A may have no way to guarantee that in fact the certificatewas received from peer B, and conversely, the same is true for peer B.An intruder, say peer C, may be in the middle of a conversation seeingeverything in clear text, and having given a “faked” self-signedcertificates to both peer A and peer B, may be pretending to be one orboth of them. Since peer C possesses both peer A and peer B's publickeys, peer C's presence may be undetectable. While it may take a greatdeal of effort to steal peer A and peer B's identities, it may be doneusing advertised, public information and information acquired as theimposter-in-the-middle. In one embodiment of a peer-to-peer network, foran intruder to steal a peer's identity, all of a peer's advertisementsmust be duplicated, possible encrypted passwords must be known, and pipeendpoint resolution spoofed. This may be possible with self-signedcertificates and this attack. Such an intruder could fully participatein a peer group using this stolen role.

However, for some classes of applications, this behavior may beacceptable if the above threats are clearly understood by the users. Forexample, a family may form a peer group to participate in secure instantmessaging among the family members. The underlying messages may beprivate, for example secured with TLS using 1024 bit RSA, 128-bit RC4,and SHA-1. The family may not worry that an imposter might try tointercept their conversations. This is a cost/risk decision whose riskis likely extremely small.

If the “imposter in the middle” attack is an unacceptable risk, andpeer-to-peer zero-dollar-cost certificates are desired, a more securespectrum point may be used by exchanging certificates in person, forexample using infrared or floppy disks. This is eyeball-to-eyeballtrust, and in certain peer groups, this is achievable and very secure.

If additional security is desired, then peer group members may delegatecertificate signature authority to selected members of a peer group. Forexample, if peer A wants to acquire a signed certificate from peer Bthat is a Certificate Authority, peer A generates a public, private keypair, sends the public key, algorithm parameters and personalidentification to peer B, and then proves ownership of the private key.Peer B may accomplish the latter with a challenge encrypted in thepublic key and sent to peer A that owns the private key. Only peer A candecrypt the challenge, again encrypt it in peer A's private key, andsend it back to peer B for verification. Once ownership is verified,peer B may issue a signed certificate to peer A. To verify that peer Bindeed signed the certificate, peer A must have peer B's public key. Inaddition, if peer A wants to communicate securely with peer C, then hetoo must have peer B's public key and must trust peer B's signature.This makes the imposter-in-the-middle attack very difficult since peerB's signature is created with his private key, and peer A, and peer Chave peer B's public key. This taken with strong authentication, andauthorization may prevent role theft.

In one embodiment, a method similar to the above may be applied tocreate a “web of trust”-like signed certificate distribution in a peergroup. A key ring of signed certificates may be created, and trustassigned using personal input obtained, for example, using the trustmechanism.

In one embodiment, a peer group-Certificate Authority, e.g. peer B, toboth sign and distribute signed certificates to peer group members. Ifpeer B has signature authority in the peer group, and peer A is a peergroup member that trusts peer B, then peer A must have peer B's publickey. One way to accomplish this is to have a root certificate on eachpeer in the peer group when the peer-to-peer software is loaded. Theseroot certificates may be generated, for example, by a trustedpeer-to-peer organization or satellite that may be a true CertificateAuthority. In a peer-to-peer environment implemented in accordance witha peer-to-peer platform, for example the peer-to-peer platform describedlater in this document, root certificates may be included with releasesof the peer-to-peer platform.

Given such a bootstrap mechanism, peer B may request a signedcertificate from any of the trusted satellites, their goal being topropagate signing authority within peer groups without taking on theentire responsibility. Peer A may then, in the same way, open a secure,TLS session with peer B's system receiving peer B's satellite-signedX.509v3 certificate in the TLS handshake, verifying peer B'sauthenticity, and may acquire a certificate signed by Peer B using atotally secured connection. At the same time, peer A saves peer B'scertificate on a key ring for future use of peer B's public key. Here,for example, peer A might want to send peer B some private email, orchat privately with peer B.

Peer B, and other peer group Certificate Authorities may maintaincertificate revocation lists to assure that any transaction with aknown, breached certificate cannot take place, thus taking security onestep closer to a true peer group PKI. That final step may be taken byplacing known and trustworthy Certificate Authorities into the peergroup and delivering their public keys in root certificates, for examplewith the peer-to-peer platform.

In one embodiment, the trust mechanism may be used in calculating codattrust based on a peer's reputation in a given peer group. Since acertificate is one form of codat, in one embodiment the trust mechanismmay be applied to a peer's peer group key ring, i.e., a peer groupmember's collection of signed certificates for a given peer group. Inthe following discussion, it is assumed that the keyword is “signedcertificates” or another keyword used to signify signed certificates,and that the expected response is the search target's peer group keyring contents. In one embodiment, for a peer group(i), a peer mayinclude one or more tables as illustrated in FIGS. 56A and 56B formatches to the keyword “signed certificates,” in which codat confidenceis replaced with certificate confidence. In one embodiment, the tablesillustrated in FIGS. 56A and 56B may be included in the codat confidencetable and/or the peer confidence table(s) as illustrated in FIGS.53A-53C.

In one embodiment, an exemplary certificate confidence table 430 asillustrated in FIG. 56A may be the peer's key ring trust table for thepeer group(i), and each entry 432 may be associated with a signedcertificate. Each certificate confidence entry 432 may indicate a trustin a particular path to another peer corresponding to the certificate.In FIG. 56B, the peer confidence values in table 440 may be userdefined, and each peer's entry may have, for example, two values. Afirst value, peer confidence_(certificate) 442, indicates a user'sconfidence in using a given peer's certificate, i.e. public key, forsecuring a transaction. A second, peer confidence_(recommender) 444,rates that peer as a recommender, or certificate cosigner.

As an example of using peer confidence_(recommender), if a peer Areceives a peer C's certificate from a peer B, and peer A does not knowthe subject, peer C, of that certificate and peer B does, then it mayneed to be determined whether peer A is willing to use peer B'srecommendation of peer C. Peer B may have assigned a certificateconfidence value to peer C's certificate. The peerconfidence_(recommender) may be used to determine if peer A uses thecertificate as recommended by peer B, and to what degree.

As another example of using peer confidence_(recommender), the value maybe used by a peer A to rate a peer B's signature, for example if peer Bcosigns a certificate.

Trust may be transitive. In one embodiment, transitivity may bemeasured, and the degree of transitivity may be user-definable. Peerconfidence_(recommender) 444 may be used as an indication of thetransitivity of trust. For example, if the peer confidence_(recommender)is less than, for example, 4, the trust relationship may be weaklytransitive. This is from the local peer's perspective and may be basedon reputation.

In one embodiment, certificate confidence 432 may be initially, forexample, 4.0, as a default value for certificates originating on a peer.In one embodiment the certificate confidence corresponding to acertificate may be weighted by the trust path and the peerconfidence_(recommender) value if the source is not the issuer. Thefollowing is an exemplary method to calculate entries 432 (trust paths)in a certificate confidence table 430 as illustrated in FIG. 56A.

Under a web of trust, if a peer A's certificate is self-signed, a peer Bknows peer is A, and peer B gets peer A's certificate from peer A who isthen the certificate's subject, then using formula 2) for a path oflength l:

$\begin{matrix}{{{certificate}\mspace{20mu}{confidence}_{path}} = {\frac{{peer}\mspace{14mu}{{confidence}_{certificate}({subject})}}{4} \times {certificate}\mspace{14mu}{confidence}_{provider}}} & \left. 7 \right)\end{matrix}$

In one embodiment, the certificate confidence may have an initial value,e.g. 4.0, and peer confidence_(subject) may default to a value, e.g.2.0, or average, but may each be modified by the user.

Thus, for peer A:

${{certificate}\mspace{20mu}{confidence}_{path}} = {\frac{{peer}\mspace{14mu}{{confidence}_{certificate}\left( {{peer}\mspace{14mu} A} \right)}}{4} \times 4.0}$

Thus, if peer B's peer confidence in peer A is 3.0, the certificateconfidence_(path) is 3.0. This is peer B's confidence in peer A'scertificate.

Next, if a peer C receives peer A's certificate from peer B, and peerC's peer confidence_(recommender) in peer B's is 2.5, and peer C doesnot know peer A, then:

$\begin{matrix}{{{certificate}\mspace{20mu}{confidence}_{path}} = {\frac{1}{4} \times \frac{\left( {{{peer}\mspace{14mu}{confidence}_{recommender}} + {{peer}\mspace{14mu}{{confidence}_{certificate}({subject})}}} \right)}{2} \times {certificate}\mspace{14mu}{confidence}_{provider}}} & \left. 8 \right)\end{matrix}$

In one embodiment, a default peer confidence_(recommender) value may be1.0, or minimal, as relationships may be initially weakly transitive.

Given the above, the certificate confidence_(path) for peer A'scertificate is:

${{certificate}\mspace{20mu}{confidence}_{path}} = {{\frac{\left( {2.5 + 2.0} \right)}{8} \times 3.0} = 1.69}$

Here the certificate confidence for peer A's certificate on peer B'ssystem is 3.0 (from the first example), and is used in the calculationin lieu of the default 4.0 value. Peer C rates peer B's recommendationsat 3.0, and on peer C's key ring, peer A's certificate has a certificateconfidence of 1.69.

In one embodiment, a certificate may have multiple signers. For example,if peer A's certificate is self-signed and cosigned by peer B, and peerC obtains the cosigned certificate from peer B, then the certificateconfidence_(path) is as above, and equals 1.69. In other words, peer Ctrusts peer B's certificate confidence in peer A.

Alternatively, if peer B cosigns the certificate, peer C gets peer A'scertificate from peer A, and does not know peer A, peer C's peerconfidence_(certificate) in peer A is 2.0. Since peer C rates peer B'speer confidence_(recommender) at 2.5, the certificate confidence_(path)is:

${{certificate}\mspace{14mu}{confidence}_{path}} = {{\frac{\left( {2.5 + 2.0} \right)}{8} \times 4.0} = 2.25}$Alternatively, if peer C's peer confidence in peer A is 3.0, then:

${{certificate}{\;\mspace{11mu}}{confidence}_{path}} = {{\frac{\left( {2.5 + 3.0} \right)}{8} \times 4.0} = 2.75}$

As another example, peer C may take peer B into account as a cosigner.Peer C may make peer B's peer confidence_(recommender) equal to 0, andnot use transitivity of trust with respect to peer B. In this case, theabove certificate confidence_(path) will be 3.0. The above may beapplied to certificates with n signatures, n−1 cosigners, and theinitial signer as P_(n):

$\begin{matrix}{{{certificate}\mspace{14mu}{confidence}_{path}} = {\frac{\left( {{\sum\limits_{i = l}^{n - 1}\;{{peer}\mspace{14mu}{{confidence}_{recommender}\left( P_{i} \right)}}} + {n\left( {{peer}\mspace{11mu}{{confidence}_{certificate}\left( P_{n} \right)}} \right)}} \right.}{2 \times 4 \times n} \times {certificate}\mspace{14mu}{confidence}_{provider}}} & \left. 9 \right)\end{matrix}$

In one embodiment, if a certificate is signed by a peer groupCertificate Authority, then that Certificate Authority's rootcertificate may be included on all peer group member peers. SuchCertificate Authority signed certificates may have a default certificateconfidence_(provider) of, for example, 4.0, and the CertificateAuthority may have default peer confidence_(certificate) and peerconfidence_(recommender) of, for example, 4.0, thus giving all suchcertificates a local default certificate confidence_(path) of 4.0, inone embodiment. Thus, the following is a certificate for peer A receivedfrom a Certificate Authority:

${{certificate}{\mspace{11mu}\;}{confidence}_{path}} = {{\frac{\left( {4.0 + 4.0} \right)}{8} \times 4.0} = 4.0}$

A user may still apply formula 7) so that if peer B receives peer A'sCertificate Authority signed certificate from peer A, and peerconfidence_(certificate)(peer A) is 3.0, then peer A's certificateconfidence will be 3.0. This may affect peer B's willingness to dofinancial transactions with peer A, or willingness to send peer Aprivate mail using S/MIME, for example. Such judgments may be personalcalls made by a peer. Downgrading such a certificate may typically berare.

At any point in time, the degree of transitivity of a given peer'sreputation as a recommender with respect to another peer may be eithertoo optimistic or pessimistic. Thus, in one embodiment, a mechanism maybe provided to measure and correct, if necessary or desired, experiencewith respect to a peer's recommendations over time. This mechanism maybe provided since peer confidence_(recommender) of each such recommendermay be explicitly defined.

Let K be the set of all certificate confidences for which there arenon-default values for both peer confidence_(certificate) and peerconfidence_(recommender) for certificates uniquely recommended orcosigned by a given peer, P₀. If K is empty, then there may not besufficient experience to reevaluate P₀. In one embodiment, the averagerecommendation for P₀ may be calculated by defining:

${{cosigner}\mspace{14mu}{peer}\mspace{14mu}{{confidence}_{recommender}\left( P_{0} \right)}} = {\frac{1}{K}{\sum\limits_{\alpha \in K}\left( {{certificate}\mspace{20mu}{confidence}_{path}} \right)_{\alpha}}}$

-   -   where |K|=number of certificates in K. The direct peer        confidence may then be calculated, e.g., as if each certificate        were obtained directly from the same subjects, e.g., peer        confidence_(recommender) is set to 0:

${{direct}\mspace{20mu}{peer}{\mspace{11mu}\mspace{11mu}}{confidence}} = {\frac{1}{K}{\sum\limits_{\alpha \in K}\left( {{peer}\mspace{14mu}{confidence}_{certificate}} \right)_{\alpha}}}$

The two values may allow a comparison of how the local peer's ratingscorrelate with the remote peer's ratings, and permit the local peer toadjust its ratings accordingly if they do not agree. For example, a peerA may obtain a peer B's certificate and a peer C's certificate from apeer D. If peer A gives peer D a peer confidence_(recommender) value of2.5, and the certificate confidence values of peer B and peer C on peerD are 2.6 and 3.0 respectively, then:

${{cosigner}\mspace{14mu}{peer}\mspace{14mu}{confidence}_{{peer}\mspace{14mu} d}} = {\frac{2.6 + 3.0}{2} = 2.8}$

If peer A rates peer B and peer C with peer confidence_(certificate)values of 3.0 and 3.8, respectively, then by applying formula 7):

${{direct}\mspace{20mu}{peer}\mspace{20mu}{confidence}} = {\frac{3.0 + 3.8}{2} = 3.4}$

Thus, peer A may be underrating peer D, and may adjust the peerconfidence_(recommender) value for peer D if desired.

Peer Identity and Authentication

In one embodiment, for a peer to be authenticated in a peer group, apeer identity may be required. In one embodiment, a peer identity may beunique across all peers. In addition, certificates issued to a peer mayhave a unique user identifier (UUID). For X.509 certificates this is anX.500 distinguished name that is unique across the Internet. An exampleis:

-   -   (CN=John Doe,    -   OU=Widgets,    -   O=ACME, Inc.,    -   C=FR)

Pretty Good Privacy (PGP) certificates also require user information butmay be less stringent about the details. The information may be“identity” information about the user such as the user's name,identifier, photograph, etc. In either case, a unique UUID may begenerated. For example:

-   -   (CN=UserName,    -   OU=<twenty-digit pseudo-random ID>,    -   O=<organization name>,    -   C=Country)

A concatenation of the above name identifiers may also be suitable for aPGP certificate. In one embodiment, given that each peer has its owncertificate, self-signed, cosigned, or Certificate Authority-signed, apeer identity may be created by hashing the concatenation of the UUIDand the public-key fields, signing this hash with the private key, andusing the digital signature as the identity. Since such a signature maybe large, for large keys, it may be the key length, and the first twentybytes, for example, may be used as a digital fingerprint. Other possiblefingerprint mechanisms are the MD5 or SHA-1 hash of the private key.Both are reproducible only by the owner of the private key, andverifiable, and may be used as a challenge. The identity may be used asthe peer's credential in messages, for example peer-to-peer platformmessages.

Given a unique identity, a peer may use the identity in accordance witha peer group's authentication policy (which also may require a passwordto be created) to grant or receive, for example, group privileges,account privileges, and a renewal period. This may be done over aprivate connection to protect the password. Finally, a group credentialmay be returned to the peer group member that acknowledges and embodiesthe authorized privileges. This same credential may then be requiredwhenever any of the associated peer group services are used.

In one embodiment, such a method may require peer-to-peer platformauthorization services. Peer group members may need to be aware of whichpeers or systems provide authorization services. In one embodiment, asource for lists of addresses (e.g. URIs) for authorization peers may bepublished, for example using a peer-to-peer platform advertisementmechanism as described later in this document.

Key Rings

Over time, peers may acquire a local collection of certificates withtheir associated public keys. Such a collection may be referred to asthe user's key ring. A peer may have at least one personal certificate.Thus, the key ring may be non-empty. A peer may both publish theexistence of this key ring and distribute its contents on request, forexample using peer-to-peer platform protocols as described for theexemplary peer-to-peer platform below. These peer-to-peer platformprotocols may permit the creation of advertisements, for example, a peermay have one or more corresponding advertisements that may containstatic information describing that peer. In one embodiment, thepeer-to-peer platform peer advertisement may have an XML tag reservedfor security, and to add security the peer's security pipe identifiermay be advertised in that XML field.

In one embodiment, each certificate on a peer key ring may include areference that may include, but is not limited to, the peer identifier,the address (e.g. email address) of the certificate's subject or owner,and the local peer's certificate confidence for that certificate. Thislist of references may be considered the peer's key ring list, and maybe accessible, for example through the peer's security pipe, and thus,may be used to publish those keys that are exportable by that peer. Inone embodiment, a certificate may be accessed using either its peeridentifier or domain name reference using the same pipe.

In one embodiment, the peer-to-peer platform may provide one or moreprotocols that may be leveraged by embodiments of the trust mechanism tosupport, advertise and access key ring lists and certificates asdescribed above. In one embodiment, the absence of a security pipeidentifier in the peer advertisement may imply that security servicesare not supported on that peer. In addition, in some embodiments, thepeer advertisement may not include the security pipe identifier in orderto reduce the size of these advertisements, and to make information likethe security pipe identifier available on demand. In this case, thesecurity pipe identifier may be available through a peer informationprotocol of the peer-to-peer platform for obtaining peer information. Inone embodiment, at least the availability of security services is partof the peer advertisement.

Peer-to-Peer Platform Transport Layer Security (TLS)

In one embodiment, for private, peer-to-peer communication, TLS may beimplemented within the constraints of the security model's trustspectrum discussed in the previous sections, and on top of thepeer-to-peer platform's core protocols. In one embodiment, aTLS_RSA_WITH_RC4_(—)128_SHA cipher suite from the peer-to-peerplatform's security toolbox may be used. One embodiment may employClaymore System's PureTLS code.

In one embodiment, self-signed certificates may be sent in the TLShandshake at the least secure end-point of this spectrum. Thus, as hasbeen previously discussed, the imposter-in-the-middle attack may bepossible, as it is for any PGP-like Web-of-Trust where self-signingcannot prevent forged certificates.

In one embodiment, cosigned certificates may be more difficult to forge.For example, consider a peer A that requires that all certificates ituses be cosigned by a peer B. Peer A initiates a private communicationwith a peer C, and a peer D is an “imposter in the middle.” Peer D mayforge peer C's certificate that is cosigned by peer B peer D. However,to be successful, Peer D will also have to forge peer B's certificatethat is resident on peer A's system.

Thus, in some embodiments, two or more points in the trust spectrum maybe implemented, e.g., self-signed and Certificate Authority signedcertificates. Some embodiments may also include cosigning ofcertificates and/or satellite Certificate Authorities, among othermeasures, which may individually or together offer better than “prettygood privacy” TLS for low or no cost.

Peer Group Authentication

Some embodiments of the exemplary peer-to-peer platform described belowmay include a framework for Pluggable Authentication Modules (PAMs).Using peer identities, a peer group authentication module may be addedto the PAM implementation of the peer-to-peer platform. In oneembodiment, a peer group member that has an authentication level ofauthority may do the initial authentication. The initial authenticationmay return a peer group credential which may include one or more of, butis not limited to, the following fields:

-   -   Authorization privileges, e.g.:        -   Data access: e.g. read and write.        -   Authentication level: e.g. trial membership, full member,            and authority.    -   Membership expiration date.    -   Hash of member's password and the algorithm used.    -   Peer Identity of initiating authority.    -   Digital Signature of the previous fields by initiating        authority.

In one embodiment, the initial authentication may be done using TLS tokeep the user's password private. Further authentication(s) to accessother group members' systems may include the above credential, and thusmay be challenged by requesting the password and reproducing the hash,after first verifying the credential with the public key of theinitiating authority.

Thus, an authentication infrastructure may be included in a peer-to-peerplatform, such as the exemplary peer-to-peer platform described below.

Peer-to-Peer Platform

The following is a description of an exemplary network computingplatform designed for peer-to-peer computing which may be used toimplement peer-to-peer environments in which embodiments of a system andmethod for implementing mobile agents in peer-to-peer networkingenvironments as described above may be implemented. Note that this is anexemplary peer-to-peer platform, and embodiments of the system andmethod for implementing mobile agents in peer-to-peer networkingenvironments as described above may be implemented in other peer-to-peerenvironments and with other peer-to-peer platforms.

The network computing platform may be referred to as a peer-to-peerplatform. The peer-to-peer platform may be used to build a wide range ofdistributed services and applications in which every device isaddressable as a peer, and where peers can bridge from one domain intoanother. The peer-to-peer platform may enable developers to focus ontheir own application development while easily creating distributedcomputing software that is flexible, interoperable, and available on anypeer on the expanded Web. The peer-to-peer platform may enable softwaredevelopers to deploy interoperable services and content, furtherspring-boarding the peer-to-peer revolution on the Internet. Thepeer-to-peer platform addresses the problems of prior art peer-to-peersystems by providing a generic and service-agnostic peer-to-peerplatform that may be preferably defined by a small number of protocols.Each protocol is preferably easy to implement and easy to be adoptedinto peer-to-peer services and applications. Thus, service offeringsfrom one vendor may be used, perhaps transparently, by the usercommunity of another vendor's system.

The peer-to-peer platform extends peer-to-peer computing to enable awide range of distributed computing applications and overcome thelimitations typically found in prior art peer-to-peer applications. Thepeer-to-peer platform is a network computing technology that provides aset of simple, small, and flexible mechanisms that can supportpeer-to-peer computing on any platform, anywhere, and at any time. Thepeer-to-peer platform generalizes peer-to-peer functionality andprovides core technology that addresses the limitations of prior artpeer-to-peer computing technologies.

The peer-to-peer platform is a modular platform that provides simple andessential building blocks for developing a wide range of distributedservices and applications. The peer-to-peer platform specifies a set ofprotocols rather than an API. Thus, the peer-to-peer platform can beimplemented in any language on any Operating System to provide solutionsranging from providing a simple protocol-based wrapper that enables asmall device to join a network of peers to developing a fully integratedapplication that supports metering, monitoring, high-level security andcommunication across server-class systems.

In one embodiment, the peer-to-peer platform architecture may include,but is not limited to, protocols, advertisements, and core services.Network protocol bindings may be used to preferably ensureinteroperability with existing content transfer protocols, networktransports, routers, and firewalls. The peer-to-peer platform may beused to combine network nodes (peers) into a simple and coherentpeer-to-peer network computing platform. Embodiments the peer-to-peerplatform may be directed at providing several benefits including one ormore of, but not limited to, no single point of failure, asynchronousmessaging, the ability for peers to adapt to their network environment,and moving content towards its consumers.

FIG. 2 illustrates one embodiment of peer-to-peer platform softwarearchitecture at the conceptual level. The peer-to-peer platform mayinclude several layers. In one embodiment, the software stack may bedescribed using three layers; a peer-to-peer platform (core) layer 120,a service layer 140 and an application layer 150. In one embodiment, thepeer-to-peer platform may include a core layer 120 that defines andencapsulates minimal primitives that are common to peer-to-peernetworking, including, but not limited to, peers 110, peer groups 122,peer discovery 124, peer communication (e.g. pipes) 126, peer monitoring128, and associated security primitives 130. This layer may be shared byall peer-to-peer devices so that interoperability becomes possible.

A peer may be defined as any entity that runs some or all of one or moreprotocols provided by the peer-to-peer platform core layer. As such, apeer may manifest in the form of a processor, a process or a device. Apeer may be anything with a digital heartbeat that supports thepeer-to-peer platform core, including sensors, servers, PCs, computersup to and including supercomputers, PDAs, manufacturing and medicalequipment, phones and cellular phones. In order to interact with otherpeers (e.g. to form or join peer groups), the peer needs to be connectedto some kind of network (wired or wireless), such as IP, Bluetooth, orHavi, among others.

The peer-to-peer platform may provide mechanisms through which peers maydiscover each other, communicate with each other, and cooperate witheach other to form peer groups. Peers may discover each other on thenetwork to form transient or persistent relationships called peergroups. A peer group is a collection of peers connected by a networkthat share a common set of interests and that have agreed upon a commonset of rules to publish, share and access any computer content (code,data, applications, or other collections of computer representableresources), and communicate among themselves. Peer groups may also bestatically predefined. The peers in a peer group may cooperate toprovide a common set of services. A peer group may be viewed as anabstract region of the network, and may act as a virtual subnet. Theconcept of a region virtualizes the notion of routers and firewalls,subdividing the network in a self-organizing fashion without respect toactual physical network boundaries. In one embodiment, peer groupsimplicitly define a region scope that may limit peer propagationrequests. Conceptually, a peer group may be viewed as a virtual entitythat speaks the set of peer group protocols.

The core layer 120 provides core support for peer-to-peer services andapplications. In a multi-platform, secure execution environment, thecore mechanisms of peer groups, peer pipes and peer monitoring may beprovided. Peer groups 122 may establish a set of peers and naming withina peer group with mechanisms to create policies for creation anddeletion, membership, advertising and discovery of other peer groups andpeer nodes, communication, security, and content sharing. Pipes providevirtual communication channels among peers. Messages sent in pipes maysupport transfer of data, content, and code in a protocol-independentmanner, allowing a range of security, integrity, and privacy options. Inone embodiment, messages may be structured with a markup language suchas XML. Peer monitoring 128 enables control of the behavior and activityof peers in a peer group and can be used to implement peer managementfunctions including access control, priority setting, traffic metering,and bandwidth balancing.

The core layer 120 may include protocols and building blocks to enablekey mechanisms for peer to peer networking, including discovery,transport (including firewall handling and limited security), and thecreation of peers and peer groups. In one embodiment, the core layer 120may be thin and small, and may provide interesting and powerfulprimitives for use by services and applications in the other layers. Thecore layer 120 may support choices such as anonymous vs. registeredusers and encrypted vs. clear text content without imposing specificpolicies on developers. Policy choices may be made, or when necessary,implemented, at the service layer 140 and/or application layer 150. Forexample, administration services such as accepting or rejecting a peer'smembership in a peer group may be implemented using the functionalityprovided by the core layer 120.

The core components of the peer-to-peer protocol may be used toimplement discovery mechanisms for searching, publishing and recoveringof core abstractions (e.g. peers, peer group, pipes, endpoints, andadvertisements). In one embodiment, these mechanisms may be simple,administration free, and may not require special peers to act as“master” peers. These mechanisms may allow processes in the peer-to-peernetwork, in absence of help from other applications and/or services, tobootstrap and find out the information necessary to access applicationsand services that can help. In addition, the core may “return” to thisstandalone behavior and still function if helper applications orservices fail. In one embodiment, safety mechanisms may be put in placein order to avoid a major overflow of “web-crawling.” In one embodiment,applications and/or services that support the peer-to-peer protocol mayaccess, control, and/or override the core components, even to theextreme of implementing a centralized, client-server model based on thecore components.

At the highest abstraction level, the peer-to-peer platform may beviewed as a set of protocols provided at the core layer 120. In oneembodiment, a common thread among peer-to-peer platform peers isprotocols, not APIs or software implementations. In one embodiment, thepeer-to-peer platform protocols may guarantee interoperability betweencompliant software components executing on potentially heterogeneouspeer runtimes. Thus, embodiments of the peer-to-peer platform may beagnostic to programming languages. The term compliant may refer to asingle protocol only. That is some peers may not implement all the coreprotocols. Furthermore, some peers may only use a portion (client-sideor server-side only) of a protocol.

Each protocol may be defined by one or more messages exchanged amongparticipants of the protocol. Each message may have a predefined format,and may include various data fields. In one embodiment, the protocolsmay utilize messaging such as XML messages. The peer-to-peer platformconnects peer nodes with each other. In one embodiment, the peer-to-peerplatform may be platform-independent by virtue of being a set ofprotocols. As such, the peer-to-peer platform may not require APIs andremains independent of programming languages, so that it can beimplemented in C/C++, Java, Java 2ME, Perl, Python or other languages.This means heterogeneous devices with completely different softwarestacks can preferably interoperate through the peer-to-peer platformprotocols. To underpin this set of protocols, the peer-to-peer platformmay define a number of concepts including peer, peer group,advertisement, message, pipe, and more.

In one embodiment, peer-to-peer protocols may be embodied as markuplanguage (e.g. XML) messages that may be sent between two peers. In oneembodiment, the peer-to-peer platform messages may define the protocolsused to discover and connect peers and peer groups, and to accessresources offered by peers and peer groups, among others. The use ofmarkup language (e.g. XML) messages to define protocols may allow manydifferent kinds of peers to participate in a protocol. Each peer may befree to implement the protocol in a manner best suited to its abilitiesand role. For example, not all peers are capable of supporting a Javaruntime environment. In one embodiment, the protocol definition does notrequire nor imply the use of Java on a peer.

Several peer-to-peer platform protocols that may be provided byembodiments of the peer-to-peer platform are described later in thisdocument. The protocols defined in this document may be realized overnetworks including, but not limited to, the Internet, a corporateintranet, a dynamic proximity network, a home networking environment,LANs, and WANs. The protocols defined in this document may also berealized within a single computer. Thus, in one embodiment, thepeer-to-peer platform may be transport protocol independent. The sizeand complexity of the network peers that may support these protocolspreferably includes a wide range of peer implementations including peersimplemented on, but not limited to, simple light switches, PDAs, cellphones, pagers, laptop and notebook computers, smart appliances,personal computers, workstations, complex, highly-available servers,mainframe computers and even supercomputers.

The peer-to-peer platform may further include a peer-to-peer serviceslayer 140. This layer may provide capabilities that may not beabsolutely necessary for a peer-to-peer network to operate but that maybe desirable to provided added functionality beyond the core layer 120in the peer-to-peer environment. The service layer 140 may deal withhigher-level concepts such as search and indexing, directory, storagesystems, file sharing, distributed file systems, resource aggregationand renting, protocol translation, authentication and PKI (public keyinfrastructure) systems. These services, which may make use of theprotocols and building blocks provided by the core layer 120, may beuseful by themselves but also may be included as components in anoverall peer-to-peer system. Thus, services may include one or moreservices 144 provided by the peer-to-peer platform. Theseplatform-provided services 144 may include indexing, searching and filesharing services, for example. The services layer 140 may provide hooksfor supporting generic services (such as searching, sharing and addedsecurity) that are used in many peer-to-peer applications. Thus,services may also include one or more services 142 not provided as partof the peer-to-peer platform but rather provided by the peer-to-peerplatform community. These services 142 may be user-defined and may beprovided, for example, to member peers in a peer group as a peer groupservice.

Services may expand upon the capabilities of the core layer 120 and maybe used to facilitate application development. Facilities provided asservices in the service layer 140 may include mechanisms for search andindexing, directory, storage systems, file sharing, distributed filesystems, resource aggregation and renting, protocol translation,authentication, PKI services, and caching code and content to enablecross-application bridging and translation of files, among others.Searching capabilities may include distributed, parallel searches acrosspeer groups that are facilitated by matching an XML representation of aquery to be processed with representations of the responses that can beprovided by each peer. These facilities may be used for simple searches,for example searching a peer's repository, or more complex searches ofdynamically generated content that is unreachable by conventional searchengines peer-to-peer searches may be conducted across a company'sintranet, for example, to quickly locate relevant information within asecure environment. By exercising tight control over peer groupmembership and enabling encrypted communication between peers, a companymay extend this capability to its extranet, including business partners,consultants, and suppliers as peers. The same mechanisms that facilitatesearches across the peer group may be used as a bridge to incorporateInternet search results, and to include data outside of the peer's ownrepository, for example searching a peer's disk. The peer services layer140 may be used to support other custom, application-specific functions.For example, a secure peer messaging system may be built to allowanonymous authorship and a persistent message store. The peer serviceslayer 140 provides the mechanisms to create such secure tools; theapplication developers themselves may determine specific tool policies.

The peer-to-peer platform may also include a peer-to-peer applicationlayer 150. The application layer 140 may support the implementation ofintegrated applications such as file sharing, resource sharing, monetarysystems, distributed storage, peer-to-peer instant messaging,entertainment, content management and delivery, peer-to-peer emailsystems, distributed auction systems, among others. Applications may be“vertical” or they may be developed to interoperate with otherdistributed applications. One or more applications 154 may be providedas part of the peer-to-peer platform. For example, one embodiment of thepeer-to-peer platform may include a shell application 160 as adevelopment environment built on top of the platform. The shellapplication may provide interactive access to the peer-to-peer platformvia a simple command line interface 162.

Applications may also include community applications 152 not provided bythe peer-to-peer platform. These community applications 152 may beuser-defined and may be provided, for example, to member peers in a peergroup as a peer group application.

In one embodiment, the boundary between services and applications is notrigid. An application to one customer can be viewed as a service toanother customer. An application may use services. Services may serve asprotocols that may be shared among various applications. An applicationmay provide a user interface, a way to define a set of files to share, away to initiate a search, a way to display the results, and a way toinitiate a file transfer, for example. Such an application may make useof a set of services, for example a reliable point-to-point filetransfer service, a distributed search service, a discovery service tolocate other peers, among others.

Applications may be built using peer services as well as the core layer120. The peer-to-peer platform may support the fundamental levelsbroadly, and rely on the peer-to-peer development community to provideadditional peer services and applications. Peer applications enabled byboth the core layer 120 and peer services layer 140 may includepeer-to-peer auctions that link buyers and sellers directly, with buyersable to program their bidding strategies using a simple scriptinglanguage, for example. Resource-sharing applications, such as SETI@home,may be built more quickly and easily, with heterogeneous, worldwide peergroups supported from day one. Instant messaging, mail, and calendaringservices may facilitate communication and collaboration within peergroups that are secure and independent of service provider-hostedfacilities. Virtually any other type of application may be build on topof the core layer 120 and services layer 140.

Some features, such as security, may manifest in all three layers andthroughout a peer-to-peer system, albeit in different forms according tothe location in the software architecture. In one embodiment, the systemmay be modular, and allows developers to pick and choose a collection ofservices and applications that suits their needs.

A typical peer-to-peer platform network may provide an inherentlynondeterministic topology/response structure. In a peer-to-peer platformnetwork, a specific resource request may not return for minutes, hours,or even days; in fact, it may never return at all. In addition, peoplefrom different parts of the world requesting the same resource arelikely to get different copies of the resource from completely differentlocations. Peers may obtain content from multiple servers, ideallyreaching a nearby one that is up and running. The original source peerneed not service every resource request; in fact, it does not even haveto be up and running. The nondeterministic structure may also helpprovide the optimized use of network bandwidth. The concentratedlocalized traffic congestion typical of today's Web does not affectpeer-to-peer networking. The nondeterministic structure may also helpprovide a lowered cost of content distribution. The peer-to-peer networkcan absorb contents and replicate it for easy access. Thenondeterministic structure may also help provide leveraged computingpower from every node in the network. With asynchronous operations, auser may issue many requests for many resources or servicessimultaneously and have the network do the work. The nondeterministicstructure may also help provide unlimited scalability. A properlydesigned peer-to-peer application may span the entire known connecteduniverse without hitting scalability limits; this is typically notpossible with centralized schemes. Note, however, that the peer-to-peerplatform also may support deterministic, synchronous applications.

As an example of a nondeterministic, asynchronous application, considera network-based music request service that operates over a peer-to-peerplatform-based peer-to-peer network. A peer submits multiple requestsfor music files and then checks back later to see if the music requestservice in the peer group has found them. A few requested files havebeen found, but others cannot be located. The service's response inregards to the files that cannot be located may be something like “Musicselection and availability changes continuously; please retry yourrequest later.” This is an acceptable nondeterministic outcome. Eventhough the service could not find a file, the same file may be availablelater if the same request is resubmitted, because peers that host thedesired files may have come online in the meantime.

The peer-to-peer platform provides the ability to replicate informationtoward end users. Popular content tends to be replicated more often,making it easier to find as more copies are available. Peers do not haveto always go back to the same peer to obtain the information they want,as is typical in the client/server model. Peers may obtain informationfrom neighboring peers that have already cached the information. Eachpeer may become a provider to all other peers.

In one embodiment, the peer-to-peer platform may enable peers to findcontent that is closest to them. This content may include data (e.g.files) or even services and applications. For example, if a peer node inan office peer-to-peer network using the peer-to-peer platform is moved,the peer-to-peer platform may allow the peer to automatically locatecontent (e.g. using a discovery service that participates in thediscovery protocol) including services (e.g. a printer service and anemail service) hosted by other peers closest to the peer's new location,without requiring any manual reconfiguration. Further, at least somecontent may be copied or moved to the peer in its new location and/or toother peers proximate to the new location.

In one embodiment, the peer-to-peer platform may provide a decentralizedenvironment that minimizes single points of failure and is not dependenton any centralized services. Both centralized and decentralized servicesmay be developed on top of the peer-to-peer platform. With the additionof each new network peer, the network platform preferably becomes morerobust as it expands. In the environment, services may be implemented tointeroperate with other services giving rise to new peer-to-peerapplications. For example, a peer-to-peer communications service likeinstant messaging may easily be added to a resource-sharing peer-to-peerapplication if both support at least the necessary peer-to-peer platformprotocols.

The peer-to-peer platform may provide interoperability. The peer-to-peerplatform may be used by developers independent of preferred programminglanguages, development environments, or deployment platforms.Embodiments of the peer-to-peer platform may enable interconnected peersto easily locate each other, communicate with each other, participate incommunity-based activities, and offer services to each other seamlesslyacross different peer-to-peer systems and different communities. Thepeer-to-peer platform may also provide platform independence.Embodiments of the peer-to-peer platform may be independent ofprogramming languages (such as C/C++, Java, Perl, and KVM), systemplatforms (such as the Microsoft Windows, UNIX®, Solaris, Linux andMacintosh platforms), and networking platforms (such as TCP/IP,Bluetooth and Havi). Thus, heterogeneous devices with completelydifferent software stacks may interoperate through the peer-to-peerplatform protocols. Embodiments of the peer-to-peer platform may beimplementable on any device with a digital heartbeat, including, but notlimited to, sensors, consumer electronics, Personal Digital Assistants(PDAs), appliances, network routers, desktop computers, data-centerservers, and storage systems. Embodiments of the peer-to-peer platformmay enable peers, independent of software and hardware platform, tobenefit and profit from being connected to millions of other peers.

In one embodiment, the peer-to-peer platform may run on any of variousoperating systems including embedded operating systems (with theappropriate level of Java runtime support, if required) such asWindows95, 98, 2000, ME, and NT, Solaris, Unix, Macintosh, Linux, Java 2Platform, Micro Edition (J2ME) and PersonalJava Technology. Thepeer-to-peer platform may be implemented in any of a variety ofdevelopment environments using any of a variety of programminglanguages, or combinations of programming languages, including, but notlimited to, Java, Java 2ME, C/C++, Perl, Python and KVM. In oneembodiment, the peer-to-peer platform may be implemented in Java. In oneembodiment, a peer-to-peer platform may be implemented in C/C++ on somedevices, for example, to support devices without Java support. In oneembodiment, a peer-to-peer platform may be implemented in KVM on somedevices, for example, so that all KVM capable devices such as PDAs andcell phones can be peer-to-peer platform peers. Programming languagesother than those listed may also be used in various embodiments.

A minimal device with the ability to generate a text string maytheoretically participate in a peer-to-peer platform network (though notnecessarily in every peer-to-peer application). The simplistic devicemay need a surrogate peer on the peer-to-peer network. This surrogatepeer may perform discovery, advertisement, and communications on behalfof the simplistic device (or many simplistic devices). The location ofthe surrogate may be hard-wired into the simplistic device. In this way,the simplistic device with the help of the surrogate can be afull-fledged peer on the peer-to-peer platform network. For example, aGPS locator, strapped to a sea turtle and sending out peer-to-peerplatform messages wirelessly with location information, may become apeer on a peer-to-peer platform network.

Embodiments of the peer-to-peer platform may be independent of transportprotocols. For example, the peer-to-peer platform may be implemented ontop of TCP/IP, HTTP, Bluetooth, HomePNA, and other protocols. Thus, asystem built on top of the peer-to-peer platform preferably functions inthe same or similar fashion when the system is expanded to a newnetworking environment or to a new class of devices, as long as there isa correct transport protocol handler for the new networking protocol.

In one embodiment, the peer-to-peer platform may use XML as the encodingformat. XML may provide convenience in parsing and extensibility. Otherembodiments of the peer-to-peer platform may use other encoding formats.The use of XML does not imply that all peer-to-peer platform peer nodesmust be able to parse and to create XML documents. For example, a cellphone with limited resources may be programmed to recognize and tocreate certain canned XML messages and can still participate in apeer-to-peer platform network of peers. In one embodiment, a lightweightXML parser may be used that supports a subset of XML. This may helpreduce the size of the peer-to-peer platform.

There may be areas in a peer-to-peer environment where there is not onecorrect way to do something or where what should be done depends on thenature and context of the overriding application. For example, in thearea of security, every peer-to-peer application may choose a differentauthentication scheme, a different way to ensure communication security,a different encryption algorithm for data security, a differentsignature scheme for authenticity, and a different access controlpolicy. Therefore, for these areas, the peer-to-peer platform maypreferably focus on mechanisms instead of policy, so that applicationdevelopers can have the maximum freedom to innovate and offercompetitive solutions.

Implementations of the peer-to-peer platform may be illustrated with afew application or usage scenarios. For example, assume there is apeer-to-peer community offering a search capability for its members,where one member can post a query and other members can hear and respondto the query. One member is a Napster user and has implemented a featureso that, whenever a query is received seeking an MP3 file, this memberwill look up the Napster directory and then respond to the query withinformation returned by the Napster system. Here, a member without anyknowledge of Napster may benefit because another member implemented abridge to connect their peer-to-peer system to Napster. The peer-to-peerplatform may provide a platform bridge that may be used to connect thevarious peer-to-peer systems together.

In another example, one engineering group requires a sizable storagecapability, but also with redundancy to protect data from sudden loss.Using the peer-to-peer platform, each group may buy a simple storagesystem without a mirroring feature, where the disks can then discovereach other automatically, form a storage peer group, and offer mirroringfacilities using their spare capacity.

As yet another example, many devices such as cell phones, pagers,wireless email devices, Personal Digital Assistants (PDAs), and PersonalComputers (PCs) may carry directory and calendar information. Using thepeer-to-peer platform, these devices may be able to interact with eachother, without extra networking interfaces except those needed by thedevices themselves, using the peer-to-peer platform as the common layerof communication and data exchange.

Peer-to-Peer Platform Identifiers

In embodiments the peer-to-peer platform, peer-to-peer platformprotocols may need to refer to peers, peer groups, pipes and otherpeer-to-peer platform resources. In one embodiment, these references maybe presented in the protocols as peer-to-peer platform identifiers.Peer-to-peer platform identifiers may provide a mechanism for uniquelyidentifying specific peer groups, peers, pipes, contents and serviceinstances, among other resources. Peer-to-peer platform identifiers mayprovide unambiguous references to the various peer-to-peer platformentities. There may be several types of peer-to-peer platform entitieswhich may have peer-to-peer platform identifier types defined includingone or more of, but not limited to: peer groups, peers, pipes, content,module classes and module specifications.

In one embodiment, peer-to-peer platform identifiers may be presented asUniform Resource Names (URNs). URNs are a form of URI (Uniform ResourceIdentifier) that are intended to serve as persistent,location-independent, resource identifiers. Like other forms of URI,peer-to-peer platform identifiers are presented as text. Refer to IETFRFC 2141 for more information on URNs.

In one embodiment, a peer-to-peer platform identifier is a standard URNin the peer-to-peer platform identifier namespace. Peer-to-peer platformidentifier URNs may be identified by a namespace identifier, for example“xxxx.” Each peer-to-peer platform identifier URN may also include anidentifier format keyword. The identifier format keyword may indicatehow the identifier was created and may allow peer-to-peer platformbindings to extract additional information from the identifier. In oneembodiment, peer-to-peer platform identifier formats may be defined torefer to resources both within peer-to-peer platform and to bridge toother technologies. One embodiment may use the ABNF syntax as defined in“IETF RFC 2234” as a format specification.

When peer-to-peer platform identifiers are used within peer-to-peerplatform protocols, the identifiers may be manipulated as text stringURIs. Operations available for URIs may include compare, resolve, anddecompose. Peer-to-peer platform identifier URIs may be compared forequality as strings. Peer-to-peer platform identifier URIs may also beresolved to the resource they reference. Peer-to-peer platformidentifier URIs may be decomposed and interpreted by peer-to-peerplatform bindings. To interpret a peer-to-peer platform identifier, apeer-to-peer platform binding may support the identifier format used bythat peer-to-peer platform identifier. For many peer-to-peer platformprotocols and operations, it may not be necessary to decompose thepeer-to-peer platform identifiers.

In one embodiment, peer group identifiers may be used to refer to peergroups. In one embodiment, a peer group identifier may canonically,uniquely and unambiguously refer to a peer group. In one embodiment,other identifier formats may support this identifier type because theother identifier types may refer to the peer group to which they belong.

In one embodiment, peer identifiers may be used to refer to peers. Inone embodiment, a peer identifier may canonically, uniquely andunambiguously refer to a peer. If a peer-to-peer platform bindingrecognizes the identifier format, it may be able to extract a peer groupidentifier from a peer identifier. This peer group identifier identifiesthe peer group of which the peer is a member.

In one embodiment, codat identifiers may be used to refer to codats. Acodat identifier may canonically, uniquely and unambiguously refer to acodat. In one embodiment, support for codat identifiers may be optional.In one embodiment, if a peer-to-peer platform binding recognizes thecodat identifier format, it should be able to extract a peer groupidentifier from a given codat identifier. This peer group identifieridentifies the peer group to which the codat belongs.

The term “codat” as used herein refers to any computer content—code,data, applications, or other collection of computer representableresources. In one embodiment, the peer-to-peer protocol may notdistinguish among different types of resources that can be stored on acomputer and shared among peers in a peer group. Examples of codatinclude text files, photographs, applets, executable files, serializedJava objects, SOAP messages, etc. Codats are the elementary unit ofinformation that is exchanged among peers. In this embodiment, giventhat codats may have arbitrary forms and properties, it may not be clearwhat sets of actions should be defined for them. In one embodiment, thecodats may carry or include definitions of how they should be accessed.Such codats are analogous to objects, which may define for themselvesaccess methods others can invoke.

In one embodiment, pipe identifiers may be used to refer to pipes. Apipe identifier may canonically, uniquely and unambiguously refer to apipe. In one embodiment, support for pipe identifiers may be optional.In one embodiment, if a peer-to-peer platform binding recognizes thepipe identifier format, it should be able to extract a peer groupidentifier from a given pipe identifier. This peer group identifieridentifies the peer group to which the pipe belongs.

In one embodiment, a module class identifier may identify a particularlocal behavior; for example, a specific API for each executionenvironment for which an implementation of the module exists. A moduleclass identifier may canonically, uniquely and unambiguously refer to amodule class as defined by an advertisement. If a peer-to-peer platformbinding recognizes the module class identifier type, it should be ableto extract a base class identifier from a module class identifier. Thebase class identifier allows applications to determine if two moduleclass identifiers differ only in the “role” they perform. In oneembodiment, a module specification identifier's “roles” may allow thesame module to be reused within a group and to have instancesdistinguished. This may be necessary when, for example, a commondatabase service is used, with each role accessing a different data set.

In one embodiment, a module specification identifier may uniquelyidentify a particular network behavior (e.g. wire protocol andchoreography) that may be embodied by a software module. In oneembodiment, there may be any number of implementations of a given modulespecification identifier. A module specification identifier may uniquelyidentify an abstract module for which there may be multipleplatform-specific implementations. A module specification identifier maybe used to locate a compatible implementation so that it can beinstantiated. In one embodiment, all such implementations are assumed tobe network compatible. A module specification identifier maycanonically, uniquely and unambiguously refer to a module specification.If a peer-to-peer platform binding recognizes this identifier type, itshould be able to extract a Module class identifier from a Modulespecification identifier. In one embodiment, each peer-to-peer platformidentifier types may have a specific definition for how its fields arerepresented within its structure.

In one embodiment, for peer-to-peer platform module class identifiers,each module may be assigned a module service identifier that may enablecanonical references to be made to the service in the context of aspecific peer group, and optionally within the context of a specificpeer. In one embodiment, for peer-to-peer platform module specificationidentifiers, each service may be assigned a unique service identifierthat may enable canonical references to be made to the service in thecontext of a specific peer group, and optionally within the context of aspecific peer.

One embodiment of the peer-to-peer platform may define an identifierformat that may be used for encoding peer-to-peer platform identifiers.Peer-to-peer platform binding implementations preferably support thisidentifier format. In one embodiment, there may be one or more reservedpeer-to-peer platform identifiers, including, but not limited to, thenull identifier, the world peer group identifier, and the net peer groupidentifier.

UUIDs

A peer group may theoretically be as large as the entire connecteduniverse. Naming anything uniquely is a challenge in such a largenamespace. In one embodiment, the peer-to-peer platform may supportand/or provide sophisticated naming and binding services. In oneembodiment, the peer-to-peer platform may use a universal uniqueidentifier (UUID), for example, a 64- or 128-bit datum, to refer to anentity or resource (e.g. a peer, peer group, service, application, pipe,advertisement, endpoint, content, etc.). For example, UUIDs may beembedded in advertisements for internal use.

UUIDs provide unique identifiers for resources in the peer-to-peerenvironment, and, in one embodiment, may identify the resourceindependently of the resource's location on the network. A UUID may bebound to other information, such as a network address of thecorresponding resource and/or a resource name of the resource. Thus,UUIDs help to provide peers, services and other peer-to-peer environmententities with access to resources in the peer-to-peer environmentindependent of the resources' locations.

In one embodiment, UUIDs may be used to guarantee that each resource orentity has a unique UUID within a local runtime environment and servesas a canonical way of referring to an entity, but because a global stateis not assumed, it may not be possible to provide a guarantee ofuniqueness across an entire community that may consist of millions ofpeers. This may not be a problem because a UUID may be used within thepeer-to-peer platform as an internal identifier. This may becomesignificant only after the UUID is securely bound to other informationsuch as a name and a network address.

The UUID is an abstract data structure, and thus virtually any canonicalmethod may be used for representing UUIDs for use in peer-to-peerenvironments. In one embodiment, different peer groups may implementdifferent canonical representations of UUIDs in the same peer-to-peerenvironment. In one embodiment, Uniform Resource Name (URN) format maybe used for the representation of UUIDs. In one embodiment, UniformResource Identifier (URI) format may be used. In one embodiment, UniformResource Locator (URL) format may be used. In one embodiment, customand/or proprietary methods of representing UUIDs may be used. Forexample, one peer group may use URN format for UUIDs, and another peergroup may use a proprietary alphanumeric naming scheme.

In one embodiment, the UUIDs may be used in providing flexibleconfiguration and seamless relocation of peer nodes on a peer-to-peernetwork, and may assist in locating and accessing content includingservices nearest to a peer node when the peer node is moved. Forexample, a businessperson based in New York may participate in apeer-to-peer network based on the peer-to-peer protocols using anotebook computer or other portable computing device connected to a LANas a peer node. The businessperson may access an instance of an emailand/or other services locally hosted by other peer-nodes in a peer groupon the LAN. If the businessperson travels to Paris, for example, andtakes the notebook computer, the notebook computer may be connected to adifferent LAN at the Paris location and participate in the peer-to-peernetwork. Because the peer node has a unique identifier in thepeer-to-peer network (e.g. a UUID) rather than just a static networkaddress (the unique identifier may be bound to the static networkaddress), the peer node may seamlessly access instances of an emailservice and other services locally hosted on the LAN, or alternativelyhosted on a peer node at the peer node's original location or elsewhere,using the UUID to establish its identity. The peer node may rejoin thepeer group in New York to access one or more instances of services andother content hosted on the peer group, and may also join a peer groupat the Paris location to access one or more other instances of servicesand content.

Thus, the peer-to-peer protocols and UUIDs may provide the ability forpeer nodes to move to different peer groups and/or peer regions andaccess services and other content independent of network addresses andwithout requiring reconfiguration of the peer node. For example, whenthe exemplary peer node moves to Paris, connects to the network (at adifferent network address) and accesses an instance of an email service(either locally or remotely hosted, for example in the New York peergroup), the email service may identify the peer node by its uniqueidentifier and route the peer's email to the peer node at the newnetwork address without requiring reconfiguration of the peer node.Thus, peer nodes may be relocated and access services and other contentthat are locally hosted or services and other content hosted in theiroriginal peer group if the services and other content are not requiredto be locally hosted.

Peers

Network nodes (peers) of various kinds may join the peer-to-peernetworking platform by implementing one or more of the platform'sprotocols. A peer may be any networked device (e.g. sensor, phone, PDA,PC, server, supercomputer, etc.) that implements one or more of the corepeer-to-peer platform protocols. Each peer operates independently andasynchronously of any other peer, providing a degree of reliability andscalability not typically found in current distributed systems. Somepeers may have more dependencies with other peers due to specialrelationships (e.g. gateways or routers). In one embodiment, a peer doesnot need to understand all of the protocols of the peer-to-peerplatform. The peer can still perform at a reduced level if it does notsupport one or more of the protocols.

Peers may publish and provide network resources (e.g. CPU, storage androuting resources) that may be used by other peers. Peers may providenetwork services that may be used by other peers. Peers typicallyinteract with a small number of other peers (network neighbors or buddypeers). Peers that provide the same set of services tend to beinter-changeable. Thus, it may not matter which peers a peer interactswith. Generally, assumptions should not be made about peer reliabilityor connectivity, as a peer may appear or leave the network at any time.Peers may have persistent storage. A peer may optionally cacheinformation.

Peers may have multiple network interfaces. In one embodiment, a peermay not need to publish all of its interfaces for use with thepeer-to-peer protocols. Each published interface may be advertised as apeer endpoint. In one embodiment, a peer endpoint is an identifier (e.g.a URN or URI) that uniquely identifies a peer network interface. Peerendpoints may be used by peers to establish direct point-to-pointconnections between peers. Peers may not have direct point-to-pointnetwork connection between themselves, either due to lack of physicalnetwork connections, or network configuration (NATs, firewalls, proxies,etc.), and thus a peer may have to use one or more intermediary peers toroute a message from an endpoint to another peer endpoint.

The term rendezvous peer may be used to designate a peer that isdesignated to be a rendezvous point for discovering information aboutother peers, peer groups, services and pipes. In one embodiment,rendezvous peers may cache information that may be useful to peersincluding new peers. Rendezvous peers may provide an efficient mechanismfor peers that are far away to find (e.g. discover) each other.Rendezvous peers may make peer discovery more practical and efficient.In one embodiment, a peer group is not required to have a rendezvouspeer. In one embodiment, any or even all members of a peer group maybecome rendezvous peers in a peer group. In one embodiment, each peergroup may have different policies to authorize a peer to become arendezvous peer.

The term router peer may be used to describe a peer that crosses one ormore regions and is designated to be a router between the regions.Router peers may be used to route messages between different networkprotocols (e.g. TCP/IP, IrDA) or to peers that are behind firewalls. Inone embodiment, any or all peer members may become routers. In oneembodiment, peer groups may have different policies to authorize a peerto become a router peer for other peers.

In one embodiment, every peer in the peer-to-peer network may have aunique peer identifier (e.g. UUID). Other peer-to-peer network resourcesmay also have unique identifiers, including peer groups, services,applications, pipes, endpoints, content and resource advertisements. Inone embodiment, the peer identifier may identify a peer group in whichthe peer is a member peer. In one embodiment, a peer may have adifferent peer identifier for each group in which it is a member peer. Apeer identifier that also identifies a peer group in which the peer is amember peer may be used to differentiate peers that seek access to aservice or content on a peer within the peer group. For example, a peermay provide implementations of a service in two or more different peergroups in which it is a member peer. The peer may advertise a differentpeer identifier within each peer group, and may differentiate betweenmessages received from peers in the different peer groups by examiningtheir respective peer identifiers to identify the particular peer groupin which the peers that sent the messages are member peers to determinewhich service implementation to provide to the requesting peers.

Peers may be identified by their unique identifier (UUID) rather than bya fixed address. When a peer boots, it attempts to contact other peers.In one embodiment, contacted peers may include variable-sized cachesthat map nearby peers' UUID to their current addresses. This allowsembodiments of the peer-to-peer platform to be run over a dialupconnection, for example.

The peer identifiers may be included in resource advertisements ofresources associated with the peers. For example, the peer identifiersmay be included in peer advertisements, peer group advertisements,service advertisements, pipe advertisements and endpoint advertisements,among others. In one embodiment, a peer identifier may be bound to anetwork address (e.g. IP address, URI, URN or URL) of the peer. If thepeer changes network addresses (e.g. is moved to a new networklocation), the peer identifier may be unbound from the network addressand bound to the new network address. Thus, the peer identifier providesa dynamic identification and addressing mechanism for peers in thepeer-to-peer network, rather than a static mechanism, allowing peers tochange network locations and still be identifiable (e.g. in peer groupsthe peer is a member peer of) using the same peer identifier.

In one embodiment, the peer identifier may include informationidentifying a particular peer group the peer is a member peer of. In oneembodiment, a peer may be assigned a different, unique peer identifierfor each peer group the peer is a member peer of. In one embodiment,peer identifiers may be included in messages received from other peers.If the receiving peer is a member in more than one peer group, thereceiving peer may use the peer identifiers received in the messages toidentify particular implementations of resources (e.g. services, pipes,endpoints and content) that are available for access by the sendingpeers.

The resource identifiers may be included in resource advertisements forthe resources. At least a portion of the resource identifiers may bebound to a network address (e.g. IP address, URI, URN or URL)corresponding to the resource. At least a portion of the resourceidentifiers may also specify a particular peer and/or peer group thathosts the resource. Resources may include, but are not limited to,peers, peer groups, services, applications, advertisements, content,pipes and pipe endpoints.

In one embodiment, a peer may be assigned a unique string as a name. Anynaming scheme may be used. In one embodiment, names are not uniqueunless a coordinated naming service is used to guarantee nameuniqueness. A naming service is typically a centralized service thatguarantees the uniqueness of name and can be used to register namemapping. Examples of naming services are DNS and LDAP. In oneembodiment, the use of a naming service may be optional.

Peer Groups

Peers may spontaneously discover each other on the network to formtransient or persistent relationships called peer groups. Peer groupsare collections of peers that may share some common interest orinterests. Peer groups may also be statically predefined. In oneembodiment, a peer group may provide one or more peer group services. Inone embodiment the peer-to-peer platform may defines a core set of peergroup services. The peer-to-peer platform protocols may specify the wireformat for these core peer group services. Additional peer groupservices may be developed for delivering specific services. For example,a lookup service could be implemented to find active (running on somepeer) and inactive (not yet running) service instances

Some embodiments of the peer-to-peer platform may describe how to createand discover peer groups, but may not dictate when, where, or why tocreate a peer group, the type of the group, or the membership of thegroup. A peer group may provide a common membership definition. Eachpeer group may establish its own membership policy in a range from open(any peer can join) up to highly secure and protected (a peer may joinonly if it possesses sufficient credentials).

In one embodiment, peers wishing to join a peer group may first locate acurrent member, and then request to join the peer group. Thepeer-to-peer platform may define how to discover peer groups, e.g. usinga peer discovery protocol. The application to join may be rejected oraccepted by the collective set of current members in accordance with thepeer group's membership policy. In one embodiment, a peer group coremembership service may be used to enforce a vote among one or more groupmembers. Alternatively, one or more group representative member peersmay be elected or appointed to accept or reject new membershipapplications.

In one embodiment, the peer-to-peer platform is not concerned with whatsequence of events a peer or a peer group comes into existence.Moreover, in one embodiment, the peer-to-peer platform does not limithow many groups a peer can belong to. In one embodiment, nested and/oroverlapping peer groups may be formed. In one embodiment, there may be aspecial group, called the World Peer Group, which may include allpeer-to-peer platform peers. In one embodiment, the world peer group mayprovide the minimum seed for every peer to potentially find each otherand form new groups. In one embodiment, the world peer group has an openmembership policy (e.g. has a null membership authenticator service).Some peers inside the world peer group may not be able to discover orcommunicate with each other—e.g., they may be separated by a networkpartition. In one embodiment, participation in the World Peer Group isby default.

The peer-to-peer platform may use the concept of a peer group as animplicit scope of all messages originated from within the group. Peergroups may serve to subdivide the network into abstract regionsproviding an implicit scoping mechanism. Peer groups may provide alimited scoping environment to ensure scalability. Peer groups may beformed and self organized based upon the mutual interest of peers. Inone embodiment, no particular rules are imposed on the way peer groupsare formed, but peers with the same interests may tend to join the samepeer groups.

In one embodiment, a scope may be realized with the formation of acorresponding peer group. Peer group boundaries may define the searchscope when searching for a group's content. For example, a peer in SanFrancisco looking to buy a used car is normally not interested in carsavailable outside of the Bay Area. In this case, the peer may want tomulticast a message to a subset of the current worldwide peer group, anda subgroup may be formed especially for this purpose. In one embodiment,the multicast may be done without the formation of a new peer group. Inone embodiment, all messages may carry a special scope field, which mayindicate the scope for which the message is intended. Any peer whoreceives this message may propagate the message based on the scopeindicator. In one embodiment, using this approach, a sending peer may bebootstrapped with some well-defined scopes, and may have the ability todiscover additional scopes.

Peer groups may also be formed based upon the proximity of the memberpeers. Proximity-based peer groups may serve to subdivide the networkinto abstract regions. Regions may serve as a placeholder for generalcommunication and security configurations that deal with existingnetworking infrastructure, communication scopes and securityrequirements. Peer groups may provide a scoping mechanism to reducetraffic overload.

Peer groups may provide a secure cooperative environment. Peer groupboundaries permit member peers to access and publish protected contents.Peer groups form virtual secure regions which boundaries limit access tothe peer group resources. Secure services may be provided to peerswithin a secured peer group. Their-boundaries may or may not reflect anyunderlying physical network boundaries such as those imposed by routersand firewalls. The concept of a region may virtualize the notion ofrouters and firewalls, subdividing the network into secure regions in aself-organizing fashion without respect to actual physical networkboundaries.

Peer groups may also create a monitoring environment. Peer groups maypermit peers to monitor a set of peers for any special purpose(heartbeat, traffic introspection, accountability, etc.). Peer groupsmay also provide a controlled and self-administered environment. Peergroups may provide a self-organized structure that is self-managed andthat may be locally managed.

In one embodiment, peer groups using the peer-to-peer platform mayprovide capabilities to peers including one or more of, but not limitedto, finding nearby peers, finding named peers anywhere on the network,finding named peer groups anywhere on the network, joining and resigningfrom a peer group, establishing pipes between peer group members, andfinding and exchanging shared content.

Content

Peers may be grouped into peer groups to share content. A content ispublished and shared among the peer members of a peer group. In oneembodiment, content may be shared among group members, but not betweengroups. In this embodiment, no single item of content may belong to morethan one group. If the same content is published in two different peergroups, two different contents may be created. In one embodiment, acontent item may be published to make the item's existence known andavailable to group members using advertisements.

An instance of content is a copy of a content. Each content copy may bereplicated on different peers in the peer group. In one embodiment, eachcopy may have the same content identifier as well as a similar value.Replicating contents within a peer group may help any single item ofcontent be more available. For example, if an item has two instancesresiding on two different peers, only one of the peers needs to be aliveand respond to the content request. In one embodiment, the peer-to-peerplatform protocols do not specify how or when contents are replicated.In one embodiment, whether and how to copy an item of content may be apolicy decision that may be encapsulated in higher-level applicationsand services, for example a content management service.

A content may be any computer content (e.g. code, data, applications,active content such as services, or other collection ofcomputer-representable resources). Examples of content include, but arenot limited to, a text file, a structured document (e.g. a PDF or a XMLfile), a Java “.jar” or loadable library, code or even an executableprocess (checkpointed state). No size limitation is assumed. Eachcontent instance may reside on a different peer in the peer group. Theinstances may differ in their encoding type. HTML, XML and WML areexamples of encoding types. Each instance may have the same contentidentifier as well as a similar set of elements and attributes, and mayeven exist on the same peer. An encoding metadata element may be used todifferentiate instances of content. Making new instances of content ondifferent peers may help any single item of content be more available.For example, if an item has two instances residing on two differentpeers, only one of the peers needs to be alive and respond to thecontent request.

Items of content that represent a network service may be referred to asactive content. These items may have additional core elements beyond thebasic elements used for identification and advertisement. In oneembodiment, active content items may be recognized by Multi-PurposeInternet Mail Extensions (MIME) content type and subtype. In oneembodiment, all peer-to-peer platform active contents may have the sametype. In one embodiment, the subtype of an active content may be definedby network service providers and may be used to imply the additionalcore elements belonging to active content documents. In one embodiment,the peer-to-peer platform may give latitude to service providers in thisregard, yielding many service implementation possibilities.

In one embodiment, each item of content may have a unique canonicalname. FIG. 3 illustrates an exemplary canonical content name (which maybe referred to as a content identifier or content identifier) accordingto one embodiment. The unique identifier may include a peer groupuniversal unique identifier (UUID) 170, and may include another name 174that may be computed, parsed, and maintained by peer group members. Inone embodiment, the UUID may be a 128-bit field. In one embodiment, thename may be a byte array. In one embodiment, the particular nameimplementation within a peer group is not mandated by the peer-to-peerplatform. The name may be, for example, a hash code, a URI, a URN, or aname generated by any suitable means of uniquely identifying contentwithin a peer group. In one embodiment, a length of remainder field 172may specify the length of the name field 174 for this content in thisparticular implementation.

In one embodiment, once a content item has been published to thepeer-to-peer network, it may not be assumed that that the content can belater retrieved from the network. The content may be only available frompeers that are not currently reachable or not currently part of thenetwork. In one embodiment, once a content item has been published tothe peer-to-peer network, it may not be assumed that the content can bedeleted. Replication/republication of content by peers on the networkmay be unrestricted and the content may propagate to peers that are notreachable from the publishing peer.

Pipes

Pipes may provide the primary channels for communication among peers andare a mechanism for establishing communication between peers. Pipes maybe used as communication channels for sending and receiving messagesbetween services or applications over peer endpoints. Peer endpointscorrespond to the available peer network interfaces that can be used tosend and receive data from another peer. Pipes may connect peers thathave a direct physical link and peers that do not have a direct physicallink. In the latter case, one or more intermediary peer endpoints may beused to route messages between the two pipe endpoints. A pipe instanceis, logically speaking, a resource within a peer group. The actualimplementation of a pipe instance is typically through a pipe service.In one embodiment, at each endpoint, software to send, or receive, aswell as to manage optional associated pipe message queues is assumed,but not mandated.

In one embodiment, pipes are a mechanism for interacting with serviceson the peer-to-peer network. Rather than assuming a specific namingsystem such as DNS or a specific network addressing system such as IP,the peer-to-peer platform may abstract these concepts via severalmechanisms. Pipes provide a virtual abstraction of the network serviceusing a pipe identifier that is bound to a peer identifier via a pipeadvertisement, which in turn is bound to an endpoint address via a peeradvertisement and an endpoint advertisement. Pipes can thus be movedfrom one peer to another providing flexibility in the way a service isdeployed and consumed. The location of a machine (node) on the networkis abstracted via the concept of the peer that binds to an endpoint.This provides support for dynamic movement of endpoint addresses for aspecific peer.

In one embodiment, pipes are implemented as a service on a peer. In oneembodiment, in order for a peer to send a message to another peer'spipe, both peers must be part of the same peer group. This allows groupsof peers to potentially implement different kinds of pipes, allowing fora flexible approach to communication.

In one embodiment, to connect to a pipe, a peer may send a discoveryrequest for a pipe advertisement containing specific keywords. The peermay then receive the requested pipe advertisement. The peer may thensend a pipe resolver request for a peer matching the pipe identifier andmay then receive the peer advertisement, for example from a pipe servicethat handles the request. The peer may then send data down the pipe, forexample using a URL addressing scheme.

In one embodiment, pipes in the peer-to-peer platform may beasynchronous, unidirectional, stateless and unreliable to provide thelowest overhead. In one embodiment, pipes may be unidirectional, andthus there may be input pipes and output pipes. Asynchronous pipes mayenable developers to build large-scale interconnected distributedservices and applications. In one embodiment, pipes may beindiscriminate, and may thus support binary code, data strings, Javatechnology-based objects, and/or applets, among others. In oneembodiment, the peer-to-peer platform may not define how the internalsof a pipe work. Any number of unicast and multicast protocols andalgorithms, and combinations thereof, may be used. In one embodiment,one pipe may be chained together with each section of the chain using adifferent transport protocol.

The pipe endpoints may be referred to as input pipes (receiving end) andoutput pipes (sending end). Pipes may provide the illusion of a“virtual” in and out mailbox that is independent of any single peerlocation and network topology (e.g. multi-hops route). Services andapplications may communicate through pipes without knowing on whichphysical peer a pipe endpoint is bound. When a message is sent into apipe, the message is sent to all peer endpoints currently connected(listening) to the pipe. The set of currently connected pipe endpoints(input pipes) may be obtained using the pipe binding protocol.

Unlike conventional mechanisms, peer-to-peer platform pipes may haveends that may be moved around and bound to different peers at differenttimes, or not connected at all. In one embodiment, pipes may be virtual,in that a pipe's endpoint may be bound to one or more peer endpoints. Inone embodiment, pipe endpoints may be non-localized to a physical peer,and may be dynamically bound at creation time or runtime via the pipebinding protocol. The pipe binding process may include discovering andconnecting the two or more endpoints of a pipe.

Using pipes, developers may build highly available services where pipeconnections may be established independently of a peer location. Thisdynamic binding of pipes helps to provide redundant implementation ofservices over a peer-to-peer network. A peer may logically “pick up” apipe at any point in time. For example, a peer that wants to use a spellchecker service man connect to a peer group's spell checker pipe that isimplemented as a redundant peer group service. The peer may be servicedas long as there is at least one single instance of a spell checkerservice still running somewhere within the peer group. Thus, using pipesas described herein, a collection of peers together may provide a highlevel of fault tolerance, where a new peer at a different location mayreplace a crashed peer, with the new peer taking over the existing pipeto keep the communication going.

In one embodiment, enhanced pipes with additional properties such asreliability, security, and quality of service may be supported. Inembodiments where the peer-to-peer platform runs on top of transportsthat have such properties, an implementation may optimize and utilizethe transports. For example, when two peers communicate with each otherand both have TCP/IP support, then an implementation may use thebidirectional capabilities of TCP/IP to create bidirectional pipes.Other data transfer methods that may be implemented by pipes as providedat the service layer to provide different quality of service include,but are not limited to: synchronous request-response (the endpoint sendsa message, and receives a correlated answer), streaming (efficientcontrol-flow data transfer), bulk transfer (bulk reliable data transferof binary data), and secure (secure reliable data streams).

Pipes may offer several modes of communication. FIG. 4 illustrates apoint-to-point pipe connection between peers 200C and 200D according toone embodiment. In one embodiment, a point-to-point pipe connectsexactly two peer endpoints together, an input pipe 202A that receivesmessages sent from an output pipe 204A. The pipe appears as an outputpipe to the sender and as an input pipe to the receiver, with trafficgoing in one direction only—from the sender to the receiver. In oneembodiment, no reply or acknowledgement operation is supported. In oneembodiment, additional information in the message payload (for example,a unique identifier) may be required to thread message sequences. Themessage payload may also contain a pipe advertisement that can be usedto open a pipe to reply to the sender (send/response).

FIG. 4 also illustrates a propagate pipe with peer 200A as a propagationsource and peers 200B and 200C with listening input pipes according toone embodiment. A propagate pipe may connect two or more peer endpointstogether, from one output pipe 204B to one or more input pipes (e.g.202B and 202C). The result is that any message sent into the output pipeis sent to all input pipes. Messages flow into the input pipes from theoutput pipe (propagation source). A propagate message may be sent to alllistening input pipes. This process may create multiple copies of themessage to be sent. On transports that provide multicast (e.g. TCP/IP),when the propagate scope maps to underlying physical subnets in aone-to-one fashion, transport multicast be may used as an implementationfor propagate. Propagate may be implemented using point-to-pointcommunication on transports that do not provide multicast such as HTTP.

Messages

In one embodiment, the peer-to-peer platform may use asynchronousmessages as a basis for providing Internet-scalable peer-to-peercommunication. The information transmitted using pipes may be packagedas messages. Messages define an envelope to transfer any kinds of data.A message may contain an arbitrary number of named subsections that mayhold any form of data. In one embodiment, the messages may be in amarkup language. In one embodiment, the markup language is XML. Eachpeer's messaging layer may deliver an ordered sequence of bytes from thepeer to another peer. The messaging layer may send information as asequence of bytes in one atomic message unit. In one embodiment,messages may be sent between peer endpoints. In one embodiment, anendpoint may be defined as a logical destination (e.g. embodied as aURN) on any networking transport capable of sending and receivingDatagram-style messages. Endpoints are typically mapped into physicaladdresses by the messaging layer at runtime.

In one embodiment, a message is a set of named and typed contents calledelements. Thus, a message may be a set of name/value pairs. The contentmay be of arbitrary types. Core services may send advertisements asmessage element content.

As a message passes down a protocol stack (applications, services,endpoint and transports), each level may add one or more named elementsto the message. As a message is passed back up the stack on thereceiving peer, the protocol handlers may remove those elements. In oneembodiment, a message is an ordered sequence of message elements. In oneembodiment, the most recently added element appears at the end of themessage.

In one embodiment, a message element may include one or more of, but isnot limited to, a namespace, a name (which may be optional), a type(which may be optional), a signature or digest (which may be optional),and content. In one embodiment, every message element may be assigned toa namespace. Namespaces may be used to organize elements used bydifferent message users and transports within the same message. In oneembodiment, two namespaces names are considered equivalent if theirrepresentation is byte-for-byte identical.

In one embodiment, one or more message element namespaces may bepre-defined and reserved for user applications and services;peer-to-peer platform protocols and/or services may not use or modifyelements in these reserved namespace. In one embodiment, one or morenamespaces may be reserved for internal use by the peer-to-peer platformprotocols and services. In this embodiment, applications preferably donot create, manipulate or assume the interpretation of any of thecontent of elements in these namespaces. In some bindings, applicationsmay be forbidden from accessing or creating elements in thesenamespaces. In one embodiment, use of namespaces by services andapplications may be optional. In one embodiment, namespaces may notrequire formal registration as the protocols used need only be agreedupon by the participants.

In one embodiment, message elements may have an optional name. Elementsin the same message may have the same name.

In one embodiment, a type may be specified as a MIME type. The type maybe used by the applications and services that process the element. Inone embodiment, there may be no restriction on the set of MIME typesthat can be used by applications and services. In one embodiment, thetype of the element may be examined by a peer-to-peer platform transportto determine how to format the message element to ensure the mostefficient transfer. In one embodiment, if a type is not specified for anelement, an application stream may be assumed.

In one embodiment, the contents of the element data may be opaque toexcept to the applications and services which use these elements.

In one embodiment, a message may be a Datagram that may include anenvelope and a stack of protocol headers with bodies and an optionaltrailer. The envelope may include, but is not limited to, a header, amessage digest, (optionally) the source endpoint, and the destinationendpoint. In one embodiment, each protocol header may include, but isnot limited to, a tag naming the protocol in use and a body length. Eachprotocol body may be a variable length amount of bytes that is protocoltag dependent. Each protocol body may include, but is not limited to,one or more credentials used to identify the sender to the receiver. Inone embodiment, such a message format may support multiple transportstandards. In one embodiment, an optional trailer may include traces andaccounting information.

The messaging layer may use the transport specified by the URN to sendand receive messages. In one embodiment, both reliable connection-basedtransports such as TCP/IP and unreliable connectionless transports likeUDP/IP may be supported. Other existing message transports such as IrDA,and emerging transports like Bluetooth may be supported using the peerendpoint addressing scheme. In one embodiment, peer-to-peer platformmessages may be useable on top of asynchronous, unreliable, andunidirectional transport. In one embodiment, the peer-to-peer platformprotocols may use a low-level message transport layer (e.g. XML) as abasis for providing Internet-scalable peer-to-peer communication. In oneembodiment, the peer-to-peer platform may not assume that the networkingtransport is IP-based.

The message digest in the envelope may be used to guarantee the dataintegrity of messages. Messages may also be encrypted and signed forconfidentiality and refutability. In one embodiment, each protocol bodymay include one or more credentials used to identify the sender to thereceiver. A credential is a key that, when presented in a message body,may be used to identify a sender and to verify that sender's right tosend the message to the specified endpoint. In one embodiment, thecredential may be an opaque token that may be presented each time amessage is sent. In one embodiment, the sending address placed in themessage envelope may be crosschecked with the sender's identity in thecredential. Credentials may be stored in the message body on aper-protocol <tag> basis. In one embodiment, the exact format andcontent of the credentials are not specified by the peer-to-peerplatform. For example, a credential may be a signature that providesproof of message integrity and/or origin. As another example, a messagebody may be encrypted, with the credential providing further informationon how to decrypt the content. In one embodiment, each credential'simplementation may be specified as a plug-in configuration, which mayallow multiple authentication configurations to coexist on the samenetwork.

When an unreliable networking transport is used, each message may bedelivered more than once to the same destination or may not arrive atthe destination. Two or more messages may arrive in a different orderthan sent. In one embodiment, high-level communication services layeredupon the core protocols may perform message re-ordering, duplicatemessage removal, and processing acknowledgement messages that indicatesome previously sent message actually arrived at a peer. Regardless oftransport, messages may be unicast (point to point) between two peers ormay be propagated (like a multicast) to a peer group. In one embodiment,no multicast support in the underlying transport is required. In oneembodiment, peers receiving a corrupted or compromised message maydiscard the message. Messages may be corrupted or intentionally alteredin transmission on the network.

In one embodiment, the peer-to-peer platform may not mandate howmessages are propagated. For example, when a peer sends out a peerdiscovery message, the peer discovery protocol may not dictate if themessage should be confined to the local area network only, or if it mustbe propagated to every corner of the world.

In one embodiment, the peer-to-peer platform messages 252 may be definedwith the envelope 250 as illustrated in FIG. 5. In one embodiment, themessages are defined in a markup language. In one embodiment, the markuplanguage is XML. The following is an exemplary message in XML:

<SampleMessage> <SampleMessageVersion> version number“1.0”</SampleMessageVersion> <SampleMessageDest> destination peeridentifier </SampleMessageDest> <SampleMessageSrc> source peeridentifier </SampleMessageSrc> <SampleMessageDigest> digest</SampleMessageDigest> <SampleMessageTagName> tag</SampleMessageTagName> <SampleMessageTagData> body</SampleMessageTagData> ............. <SampleMessageTagName> tag</SampleMessageTagName> <SampleMessageTagData> body</SampleMessageTagData> <SampleMessageTrailer> String</SampleMessageTrailer> </SampleMessage>

The version number may be a string. The destination and source peeridentifier may be represented as peer-to-peer platform identifiers(UUIDs). In one embodiment, the digest is either an MD5 or SHA1 hash ora digital signature. The digest may serve as a placeholder for either. Amessage may have as many tag parts as needed. In one embodiment, the tagname may be a string and the body may be a byte array containing astring without XML escape characters (“<”, “>”) or a base 64 encodedstring.

In one embodiment, the message format may support binary data and/ormulti-part messages with MIME-types. The message format may allow forarbitrary message header fields, including optional header fields. Themessage format may allow for data verification of message content andthe cryptographic signing of messages. The message format may provide anarbitrary number of named subsections that may contain any form of dataof any (reasonable) size. The message format may be “email-safe” suchthat its contents may be extracted reliably after standard textualtransformations committed my E-mail client and server software.

Software Modules

In a peer-to-peer network, one embodiment of a peer-to-peer platform mayuse a mechanism for abstract identity and definition of software modules(e.g. services, applications, etc.) to provide information about theprogramming interface and functionality of the software modulesindependently of protocols and behaviors that may be used to implementthe software modules. Further, software modules in a peer-to-peernetwork may provide one or more implementations of a givenfunctionality, using various protocols and behaviors, while retaining acommon programming interface. The software modules may also provide oneor more different network-compatible implementations for differentexecution environments.

Embodiments may use identifiers (e.g., UUIDs) and advertisements asdescribed herein to describe and identify software modules, such asservices and applications, in a hierarchical manner. In one embodiment,a software module may be described in a module class advertisement andgiven a module class identifier. If that software module is used fordifferent purposes in the same context, the software module may befurther identified by an extension to its module class identifierreferred to as a role identifier. Each independent embodiment of thesoftware module that provides an independent set of network protocolsand behaviors may be assigned a module specification identifier.

In one embodiment, all implementations of all embodiments of a givenmodule class for a given execution environment may have the sameprogramming interface. Therefore, software modules interacting locallymay express their dependencies via their respective class identifiers(including the role extension), regardless of the particular executionenvironment and embodiment that was selected when configuring thatenvironment.

In one embodiment, a software module may be assigned a module classidentifier. Each independent embodiment of the software module thatprovides an independent set of network protocols and behaviors may bedescribed by a module specification advertisement and assigned a modulespecification identifier. In one embodiment, a module specificationidentifier may be an extension of the identifier of the module class ofwhich the module specification is an embodiment. In one embodiment, eachimplementation of each module specification may be described by a moduleimplementation advertisement that may include one or more of, but is notlimited to, the following information: a module specificationidentifier, an execution environment description, and a reference to asoftware environment (e.g. a software package which implements themodule specification for the execution environment).

To abstract software modules in peer-to-peer networking environments,embodiments may use a tiered architecture to define modules (e.g.services, advertisements, etc.) in a peer-to-peer environment. FIG. 31illustrates this tiered architecture according to one embodiment. Afirst level of the tier may include one or more module classes 1000. Inone embodiment as illustrated in FIG. 31, each module class 1000 mayhave one module specification 1002. A module specification 1002 may haveone or more module implementations 1004. FIG. 32 illustrates the tieredarchitecture according to another embodiment. In this embodiment, eachmodule class 1000 may have one or more module specifications 1002. Eachmodule specification 1002 may have one or more module implementations1004.

In one embodiment, the module class 1000 may include and/or define oneor more of, but is not limited to, the “role” a module plays (e.g., in apeer group), how the module appears to other modules (e.g., services andapplications), plus the module's API in each supported binding. In oneembodiment, the module specification 1002 may include and/or define oneor more of, but is not limited to, the module's behavior as it appearsfrom the outside (e.g. from other modules), including the module's wireprotocol and the module's compatibility with other instances of the samemodule, for example on other peers. In one embodiment, the moduleimplementation(s) 1004 may include one or more implementations of eachmodule specification 1002, with each module implementation beingspecific for one or more of various execution environments, bindings andother constraints. Each of these aspects of a module may be publishedseparately in advertisements.

To access a software module, a peer (or other entity such as anothersoftware module (e.g. service, application, etc.)) may use a discoveryprocess such as that described herein for the peer-to-peer platform todiscover a module implementation advertisement corresponding to theexecution environment of the peer. In one embodiment, the discoveryprocess may search for and discover peer specification advertisementsthat meet the specification requirements of the peer, and use the one ormore discovered peer specification advertisements to locate a particularpeer implementation advertisement for a module implementation suitablefor use in the peer's execution environment.

The layers of advertisements (module class, module specification, andmodule implementation) may be used to abstract the software modules(e.g. services) and platforms, to locate specifications for desiredsoftware modules, to locate implementations of the software modules, andto load and run the software modules.

Embodiments may provide a mechanism to identify a particular softwaremodule (e.g. a service) and its behavior. In one embodiment, a softwaremodule such as a service may be described with a module specificationidentifier. The module specification advertisement describes thesoftware module, e.g. the behavior of the software module. In oneembodiment, no matter what platform a user (or other entity such asanother software module) is on, the user or other entity may locate(e.g. by a discovery process) a particular implementation of thesoftware module for the particular platform and be able to use thesoftware module. The module implementation advertisements may describeimplementations of the software module (which may be identified by amodule specification identifier, included in the module implementationadvertisements and the module specification advertisement) for differentplatforms, e.g. Windows, Unix and Solaris platforms.

As an example, a user or other entity may be able to locate and use aparticular implementation of a printing service for use with theplatform the user or other entity is on. In one embodiment, the user orother entity may first search for and locate a specification for thesoftware module, and once that is located the user or other entity maylook for a particular implementation of the software module usable onthe user or other entity's platform, load the implementation of thesoftware module according to the advertisements for use on the platform,and run the software module.

The layers of advertisements may also serve to separate thespecification from the implementation. This may reduce the size of themodule implementation advertisements, as the advertisements do not needto include the full specification for the software module but insteadmay refer back to the specification advertisement via the modulespecification identifier. This may allow software modules to beinitially located by specification for a particular class offunctionality, rather than having to search through many implementationadvertisements of software modules to find a desired implementation of aspecification, preferably making the discovery process simpler.

In one embodiment, after locating a desired module implementationadvertisement, using a PURI (Package Uniform Resource Identifier,described below) of the module implementation advertisement, on a Javaplatform, a URI or URL to the actual code of the software module may bespecified. On other platforms such as Unix and Linux, a file locationmay be specified by URL, URI, or other mechanisms. The code may bedownloaded, referenced on disk, or referenced by the URI or othermechanism. The SURI (Specification URI, described below) of the modulespecification advertisement may function similarly to retrieve adocument containing the module specification

Services

Peers may cooperate and communicate to publish, discover and invokenetwork services. A service denotes a set of functions that a provideroffers. In one embodiment, a peer-to-peer platform peer can offer aservice by itself or in cooperation with other peers. In one embodiment,a peer may publicize a service by publishing a service advertisement forthe service. Other peers may then discover the service using the peerdiscovery protocol (through the advertisement) and make use of it. Apeer may publish as many services as it can provide.

In one embodiment, services may either be pre-installed into a peer orloaded from the network. The process of finding, downloading andinstalling a service from the network may include performing a search onthe network for the service, retrieving the service, and then installingthe service. Once a service is installed and activated, pipes may beused to communicate with the service. In one embodiment, peer-to-peerplatform-enabled services may publish pipe advertisements as their maininvocation mechanism. The service advertisement may specify one or morepipe advertisements that may be used by a peer to create output pipes toinvoke the service. The service advertisement may also include a list ofpredetermined messages that may be sent by a peer to interact with theservice. The service advertisement may describe all messages that aclient may send or receive.

Several methods may be provided by various embodiments to publish aservice. Services may be published before creating a new peer group byadding the service advertisement to the peer group advertisement.Services may also be published by adding the services in a separate peerservice advertisement. The discovery service may also allow newadvertisements to be added at runtime. The new advertisement will belongto a predefined peer group. Other methods of publishing services may beprovided. Note that service advertisements may be placed in the peergroup advertisement of any group. Since all peers belong to the globalpeer group, a peer may publish the service in the global peer groupadvertisement to make it available to any peer.

In one embodiment, services advertised in a peer group advertisement maybe instantiated for a peer when the peer joins the group. In oneembodiment, all the services are instantiated. In another embodiment,none, one, or more of the advertised services may be instantiated whenthe peer joins the peer group. Service advertisements in the peer groupadvertisement may include resolver, discovery, membership, peerinformation and pipe service advertisements. In one embodiment, servicesadvertised in a peer group advertisement are loaded on the peer when thepeer boots. In one embodiment, this automated loading is not mandatorybut is part of the Java Binding. One embodiment may provide a mechanismto force a service in a peer group advertisement to be instantiated by apeer.

In one embodiment, when a peer boots, any services advertised in thepeer advertisement are loaded. The peer advertisement corresponds to theplatform advertisement. These services may include the minimal set ofservices to bootstrap the creation of new peers: discovery service,membership service, resolver service, peer information service and pipeservice.

In one embodiment, when a peer switches from one peer group to another,the first group's services remain active. In one embodiment, a peer maycall a stop method on the service application interface to stop aninstance of a local service. A peer that is a member of one peer groupthat refers to a service may join a second peer group that also refersto the service while still a member of the first. Whether the service isinstantiated once or twice may depend on the service implementation.Some service implementations may use a static instantiation that is doneonce. In this case, all groups share the same instance. Other serviceimplementations are local to a peer group and are not aware of the stateof any other peer groups on the same node.

In one embodiment, services may use a “time to live” indicator thatdefines when the service was created, and may also define the lifetimeof the service. After its lifetime has expired, the stale service may bepurged.

A service may be well-defined and widely available so that a peer canuse it directly. Other services may require special code to access theservice. For example, the way to interface with the service provider maybe encoded in a piece of software. In this example, it may be desirablefor the peer to be able to locate an implementation that is suitable forthe peer's specific runtime environment. In one embodiment, if multipleimplementations of the same service are available, then peers hosted onJava runtimes can use Java programming language implementations whilenative peers to use native code implementations. In one embodiment,service implementations may be pre-installed into a peer node or loadedfrom the network. In one embodiment, once a service is installed andactivated, pipes may be used to communicate with the service.

In one embodiment, each service may have a unique identifier. In oneembodiment, a service may have a name that may include a canonical namestring that may indicate the type and/or purpose of the service. Aservice may also provide optional information (e.g. a set of descriptivekeywords) that further describes the service. The unique identifier,name and optional information may be stored within a serviceadvertisement. The advertisement may also include other informationneeded to configure and instantiate a service.

In one embodiment, the peer-to-peer platform may recognize two levels ofservices, peer services and peer group services. A service that executesonly on a single peer may be referred to as a peer service. A peerservice is accessible only on the peer that is publishing the service.If that peer happens to fail, then service also fails. This level ofservice reliability may be acceptable for an embedded device, forexample, providing a calendar and email client to a single user.Multiple instances of the service may be run on different peers, buteach instance publishes its own advertisement. A service that iscomposed of a collection of cooperating instances (potentiallycooperating with each other) of the service running on multiple peers ina peer group may be referred to as a peer group service. A peer groupservice may employ fault tolerance algorithms to provide the service ata higher level of availability than that a peer service can offer. Ifany one peer fails, the collective peer group service may not beaffected, because the service may still be available from at least oneother peer member. Peer group services may be published as part of thepeer group advertisement.

In one embodiment, the peer-to-peer platform may include a set ofdefault peer group services such as peer discovery, as well as a set ofconfigurable services such as routing. In one embodiment, a peer-to-peerplatform peer may not be required to have one or all of these services.For example, a cell phone peer may be pre-configured with enoughinformation to contact a fixed server provided by the telecom operator.This may be enough to bootstrap the cell phone peer without requiring itto independently carry with it additional services.

In one embodiment, although the concept of a service is orthogonal tothat of a peer and a peer group, a peer group formed using thepeer-to-peer platform may require a minimum set of services needed tosupport the operation of the group. Some services may be well known andmay be referred to as peer-to-peer platform core services. Embodimentsof the peer-to-peer platform may define a set of core peer groupservices that may be used to form and support peer groups. In oneembodiment, the core peer group services may provide the minimumservices required to form a peer group (e.g. membership and discoveryservices). In one embodiment, the peer-to-peer platform core servicesmay be 100% decentralized and thus may enable pure peer-to-peer networkcomputing. In one embodiment, it is not required that all core servicesbe implemented by every peer group.

In one embodiment, the peer-to-peer platform may define peer group coreservices including, but not limited to, a discovery service, amembership service, an access service, a pipe service, a resolverservice and a monitoring service. A discovery service may be used tosearch for peer group resources such as peers, peer groups, and pipes.The search criteria may include a resource name. Discovery and discoveryservices are described more fully later in this document.

In one embodiment, most peer groups will have at least a membershipservice. Current peer group members may use the membership serviceduring the login process to reject or accept a new peer group membershipapplication. The membership service may be a “null” authenticatorservice that imposes no real membership policy. Peers wishing to join apeer group first locate a current member, and then request to join. Theapplication to join may be either rejected or accepted by the collectiveset of current members. The membership service may enforce a vote ofpeers or alternatively elect a designated group representative to acceptor reject new membership applications.

An access service may be used to validate, distribute, and authenticatea group member's credentials. The access service may define the type ofcredential used in the message-based protocols used within the peergroup. The access service may be used to validate requests made by onepeer to another. The peer receiving the request provides the requestingpeer's credentials and information about the request being made to theaccess service to determine if the access is permitted. In oneembodiment, not all actions within the peer group need to be checkedwith the access service, only those actions which only some peers arepermitted to use.

A pipe service may be used to establish and manage pipe connectionsbetween the different peer group members. A resolver service may be usedto send query string to peers to find information about a peer, a peergroup, a service or a pipe. A monitoring service is used to allow onepeer to monitor other members of the same peer group.

In on embodiment, not all the above services are required to beimplemented by a peer group. Each service may implement one or more ofthe peer-to-peer platform protocols. In one embodiment, a service mayimplement at least one protocol for simplicity and modularity reasons,but some services may not implement any protocols.

Other services may be user-defined and provide application dependentservices such as content searching and indexing. A user-defined servicemay provide additional APIs. User-defined services may be implementedthat may offer the ability to mix-in centralization as a means ofincreasing performance. In one embodiment, the peer-to-peer platformcore services may provide a reference implementation for user-definedservices. Examples of user defined services may include, but are notlimited to:

-   -   Efficient long-distance peer lookup and rendezvous using a peer        naming and discovery service.    -   Simple, low-cost information search and indexing using a content        sharing service.    -   Interoperability with existing centralized networking        infrastructure and security authorities in corporate, public,        private, or university networks using administration services.    -   A resolver service may be implemented to find active (running on        some peer) and inactive (not yet running) service instances.    -   An FTP service that allows file transfers among peers over pipes        using FTP.        Network Services

Embodiments of the mechanism for abstract identity and definition ofsoftware modules in peer-to-peer networking environments may be used inimplementing network services. A network service may be considered asone type of software module that may be abstracted using the mechanism.Software modules may also include applications, among other types.

In one embodiment, peers may cooperate and communicate to publish,discover and invoke network services. In one embodiment, peers maydiscover network services via the peer discovery protocol of theexemplary peer-to-peer platform described herein. In one embodiment,network services may include peer services and peer group services. Apeer service may be accessible only on the peer that is publishing theservice. If that peer happens to fail, then the service also fails.Multiple instances of the service may be run on different peers, buteach instance publishes its own advertisement. A peer group service iscomposed of a collection of instances (potentially cooperating with eachother) of the service running on multiple members of the peer group. Ifany one peer fails, the collective peer group service may not beaffected, because the service may still be available from another peermember. Peer group services may be published as part of the peer groupadvertisement.

In one embodiment, services may be pre-installed into a peer or loadedfrom the network. The peer may follow a process of finding, downloadingand installing a service from the network. To run a service, a peer mayhave to locate an implementation of the service (i.e. a moduleimplementation) suitable for the peer's runtime environment. Multipleimplementations of the same service may allow, for example, Java peersto use Java code implementations, and native peers to use native codeimplementations.

In one embodiment, the peer-to-peer platform may be designed tointeroperate and be compatible with various Web service standardsincluding one or more of, but not limited to, WSDL, uPnP, RMI, etc. Thepeer-to-peer platform protocols may define a generic framework topublish and discover advertisements that may describe services. In oneembodiment, peers may publish and discover advertisements via the peerdiscovery protocol. In one embodiment, an advertisement for a servicemay include necessary information to either invoke or instantiate theservice being described. In one embodiment, one or more peer-to-peerplatform protocols may define module advertisements to describeservices.

In one embodiment, peer-to-peer platform-enabled services are servicesthat are published using module specification advertisements. In oneembodiment, a module specification advertisement may specify a pipeadvertisement that may be used by a peer to create output pipes toinvoke the service. In one embodiment, a module specificationadvertisement may include a list of pre-determined messages that may besent by a peer to interact with the service. In one embodiment, a modulespecification advertisement may include references to one or more otherservices that may be used as an authenticator for the service and/or asa local proxy for the service. In one embodiment, each service may beuniquely identified by its module specification identifier.

In one embodiment, a service may have several aspects including, but notlimited to:

-   -   The “role” the service plays in the group; how the service        appears to other services and applications, plus the service's        API in each supported binding. This may be referred to as the        service class (i.e. the module class).    -   The service's apparent behavior from the outside, including, but        not limited to, wire protocol, and compatibility with the same        service on other peers. In other words, a central definition of        a service, or the service's specification. This may be referred        to as the service specification (i.e. the module specification).    -   One or more implementations of the specification for various        execution environments, bindings and other constraints. These        may be referred to as the service implementations (i.e. module        implementations).

Each of these aspects of a service may be published separately, e.g. bythe module advertisements described above. In one embodiment, there maybe more specifications than classes and more implementations thanspecifications. In many cases, only the implementation is needed, forexample, when instantiating a group that uses the service(s). Thelayered arrangement of class/specification(s)/implementation(s) may helpsave storage space by not requiring that information be duplicated inall implementation advertisements, and may help to prevent thedownloading of unneeded data. If this information was duplicated in allimplementation advertisements, not only would it occupy more storagespace than needed, but it also may cause the downloading of unneededdata.

Service specifications may be assigned a unique identifier at the timethe advertisement is published. Service implementations may use thisidentifier to denote which service specification they implement. Serviceclasses may be assigned a unique identifier when the class'sadvertisement is first published.

In one embodiment, service specifications may use identicalimplementations; therefore, service specification advertisements mayinclude a “free form” parameter section that includes one or moreparameters that may be used to control behavior. In one embodiment,service implementations may use identical code; therefore, serviceimplementation advertisements may include a “free form” parametersection that includes one or more implementation-dependent parameters.

In one embodiment, services may refer to each other (such as whenobtaining the interface of another service from the group) by theirclass identifier.

In one embodiment, the same service specification may be used to performmore than one role in a group. For example, consider two instances ofthe same data base service with two completely different data set andpurposes. To support this, it service class identifiers may be extendedwith a “role” suffix. In this embodiment, service class identifierswithout a role suffix may accept a null role suffix as a valid rolesuffix. Thus, service class identifiers may be “roled,” and if “roleing”is never needed, only a short service class identifier may be needed.

In one embodiment, service specification identifiers may built from theclass identifier of the class that the service specification implements.In one embodiment, only the base class UUID may be included so thatservice specification identifiers are unchanged by the addition ofroles. This may be used, for example, to verify that a servicespecification does have the interface implied by the correspondingservice class, regardless of the role for which it is used.

In one embodiment, service implementation advertisements may listcompatibility requirements which may make them eligible to be loaded bya given group running in a given peer-to-peer platform implementation.

In one embodiment, groups, applications and endpoints may have similarconstraints as services. For a group, the group specification may listthe service specifications that this group supports. There may be one ormore implementations, depending on various execution constraints.Endpoints and applications may function similarly or identically toservices (i.e. groups, applications and endpoints may be considered“modules” as are services). Therefore, the mechanisms described abovefor services may also be used for groups, applications and endpoints.

In one embodiment, a peer group specification advertisement may includeindications of services, endpoints and initial applications of the peergroup.

Similarly to how service implementations are correlated to servicespecifications by a service specification identifier, a peer groupimplementation may be correlated to a group specification by a uniqueidentifier. This identifier may be referred to as a peer groupidentifier. A peer group specification may be a relatively largedocument. In one embodiment, since most of the peer group specificationmay only be needed if the group is to be instantiated, for publicizing agroup, a peer group specification advertisements including only a name,an identifier, and one or more keywords may be used to publish a peergroup. In one embodiment, to reduce the size of peer group specificationadvertisements, inheritance may be used between group definitions. Sincemost groups have a lot in common, a peer group specificationadvertisement may refer to another advertisement which may be common andtherefore cached. The above approaches to reducing the size of peergroup specification advertisements may be complementary.

In one embodiment, groups may load plug-in services according to thegroup's implementation. In one embodiment, service descriptions may notbe required in a group advertisement. However, even if services are notimplemented via plug-ins, the existence of services may be a property ofthe group that is visible “on the wire.” Therefore, peer groupspecification advertisements may list references to servicespecifications (e.g. the service specification identifier). In oneembodiment, it may be the responsibility of a group's implementation torealize the services listed in the peer group specificationadvertisement by loading a supported implementation for each service, byimplementing the service internally, or optionally using one or moreother mechanisms. In one embodiment, the service realizationmechanism(s) used is group implementation dependent.

In one embodiment, module (e.g. service) specification advertisementsmay not need to be downloaded in order to instantiate a group unless oneof the module (e.g. service) implementations needs parameters from themodule (e.g. service) specification. In one embodiment, module (e.g.service) specifications may be used by users when creating animplementation of the module (e.g. service).

In one embodiment, groups may need to uniquely identify each of theirservices, for example, to improve the robustness of demultiplexingservice-addressed messages. Since each service in a group belongs to aservice class, and no more than one service of each class may exist in agroup, the combination of the group identifier and the service classidentifier uniquely identify that service for service addressingpurposes.

In one embodiment, services may bind to and use each other. In obtainingan interface to one of the other services, a service may use the otherservice's class identifier to designate this other service. Services“know” each other by their role; and therefore they designate each otherby their class identifiers. For example, an implementation of adiscovery service may know that it needs a “Resolver.”

In one embodiment, for each service, a group advertisement may listservice specification identifiers for services of the group, since eachservice specification identifier includes a corresponding service classidentifier. In one embodiment, to support roles, a group advertisementmay optionally list an additional service class identifier for eachservice. This identifier may differ from that embedded in thespecification identifier includes in that the former may have a rolesuffix and not the latter. In one embodiment, no two services may beassigned the same role in a given group.

In one embodiment, peer groups may have a variety of specifications, butmay use a small number of implementations for the peer group API itself.The specification of the peer group functionality is the peer groupspecification advertisement, with its unique features and identifier. Inone embodiment, to avoid publishing identical peer group implementationadvertisements (except for the service specification identifier of thegroup) for each group, roles may be used. Similar to services, groupsmay come in a small family of APIs and behavior of the peer group class,and any number of roles for which they are used (e.g. in the case of agroup, various communities of users). Therefore, the “Role” modeldescribed for services may be extended to groups. There may be more thanone class of group. Further, there may be Roles in these group classes.In one embodiment, the role identifier may include the base class plusrole suffix.

In one embodiment, a peer group specification advertisement may have twoidentifiers: the specification identifier that corresponds to theparticular group service specification that is being used and the fullclass identifier (in one embodiment, including a role extension) thatmay be different for every group. In one embodiment, a servicespecification advertisement may include a class identifier in additionto a specification identifier, thereby specializing it for a given role(e.g. by changing parameters). In one embodiment, service specificationsmay be looked-up by their specification identifier, and servicespecifications may not be specialized for a role. In one embodiment,peer group specification advertisements may be looked-up byspecification identifier and role identifier. In one embodiment, notspecifying a role identifier when looking up a group may result in anerror, but may be used for browsing purposes.

In one embodiment, specifying a group may require one or more of, butmay not be limited to:

-   -   Identifiers:        -   A peer group identifier: Identifies the community built            around that group. May be turned into a full class            identifier when they become different from base class            identifiers.        -   A peer group specification identifier: Equivalent to a            service specification identifier. Identifies the behavior of            the Peer Group class (in the programming sense) being used,            not the community build around it.    -   Advertisements (may be optional or required):        -   Service class advertisement. In one embodiment, may be            required.        -   Peer group specification advertisement: Name, identifier,            the list of all services, etc. May be inherited from another            group. In one embodiment, may be required.        -   Peer group implementation advertisement: one implementation            of the code that drives the group. In one embodiment, may be            cached and reused. In one embodiment, may be required.        -   Peer Group Advertisement: an abbreviated publicizing of the            group. In one embodiment, may be optional.

In one embodiment, describing a service may require one or more of, butmay not be limited to:

-   -   Identifiers:        -   Service class identifier: denotes functionality and an            expected API per supported binding (e.g., pipe, resolver,            discovery, etc.). In one embodiment, if there is no role            suffix (role=base class), this may be fully embedded in a            service specification identifier and therefore may need to            be repeated in the group advertisement.        -   Service specification identifier: denotes additional            on-the-wire behavior in providing a service defined by its            class (e.g., platform's pipe, Intermittent Pipe, Reliable            Pipe, etc.)    -   Advertisements:        -   Service class advertisement: describes a role and may            describe a per-platform set of APIs does.        -   Service specification advertisement: describes a protocol            and behavior. In one embodiment, may be specialized for a            role.        -   Service implementation advertisement: describes an            implementation for a given platform. In one embodiment, may            be cached and reused.

In one embodiment, group identifiers may be constructed so that they areupward compatible with full class identifiers.

In one embodiment, there is one peer advertisement for each groupinstantiated on a peer. In one embodiment, a peer advertisement maydescribe only what is relevant to this group on this peer, in additionto describing the group. A peer advertisement may include one or moreof, but is not limited to, one or more parameters that are particular toone given peer for each service, a peer identifier, name and keywords.In one embodiment, a peer advertisement may include only what needs tobe published outside the peer, e.g. endpoint addresses, etc. In oneembodiment, items that affect only the local behavior or that are notspecified as being explicitly published (e.g. debug) may be left out ofthe peer advertisement and may go into an optional configurationdocument passed to the peer group object as an extra parameter. In oneembodiment, in both the configuration document and the peeradvertisement, variables may be related to services by the service classidentifier; each setting may be a <Setting> element, tagged with aservice class identifier. If there is no identifier, it means that thesetting applies to all services of this group.

The following is an example of a layout to list a service, and is notintended to be limiting:

-   -   <Service>ServiceSpecID1</Service>

The following is another example of a layout to list a service, and isnot intended to be limiting:

<Service>  <ServiceSpecID>ServiceSpecID1</ServiceSpecID> <ServiceClassID>ServiceClassID1</ServiceClassID> <SomeFOtherAttribute>whatever</SomeOtherAttribute> <IService>

Similar layouts may be used for other modules such as endpoints,applications and/or groups.

In one embodiment, peer groups may be defined by service specificationadvertisements with the group identifier equivalent to the roleidentifier. In this embodiment, the peer group advertisement may be anabbreviated version of the service specification. In another embodiment,services may be listed in the implementation advertisement for thegroup. In this embodiment, the implementation advertisement may refer tothe peer group class used, with the parameter field listing theservices. The group identifier may exist only in the peer groupadvertisement, which is the root definition of the group. Using thisembodiment, there may be no need to obtain the specificationadvertisement of the group in order to instantiate it. This groupadvertisement includes the specification identifier of the group that ismatched by that specification identifier in associated implementationadvertisements, so that an implementation of the group may be acquireddirectly from the peer group advertisement without having to lookup thespecification.

In one embodiment, the implementation advertisement of a service may beincluded in-line in the implementation advertisement of a group thatuses it, rather than including the service's specification identifier.

As used herein, the term “module” includes the notion of any random codenot part of the core system. In general, a module is a generic, loadable“thing” that has ini( ), start( ) and stop( ) methods or theirequivalents. Applications and services may be considered subclasses ofmodules. A “Service” is a subclass of module that has “get interface”and “get implementation advertisement” methods, making it suitable forregistration with a group. In one embodiment, modules may also includecode that has a known API and identity (its class identifier) and whichcan be looked-up with group lookup service.

In one embodiment, the peer configuration document has the format of apeer advertisement. In one embodiment, the peer group API may includeone or more methods that assist in loading modules, e.g. a “load module”method. In one embodiment, loading a peer group may be similar toloading any other module; one or more additional methods may be includedto perform one or more tasks particular to loading a peer group.

In one embodiment, the definition of a group or other module (that is,the class that implements it for which binding, and with whichparameters) is immutable. The information about the group or othermodule's instantiation on a peer (e.g. everything that may be differenton each peer, such as endpoint addresses, rendezvous status, etc) maybeen separated into a different advertisement: the peer advertisement.

In one embodiment, there may be one or more parameters that are privateto a peer and essentially the result of a choice by the user or defaultsthat depend on the particular peer that instantiates that module orgroup (e.g. local network interfaces, well-known rendezvous, etc.).These may be similar to the content of a peer advertisement, but may notbe published (or alternatively, if published, it is by the decision ofthe module and copied by that module to the peer advertisement). Thedocument that includes these unpublished parameters may be a peeradvertisement that may be passed as an argument to the module's initroutine. In one embodiment, providing the peer advertisement as anargument may be optional.

The following is an exemplary initialization routine for modules and isnot intended to be limiting:

-   -   Init (group, assignedID, implAdv, configAdv);        where:    -   Group: The group that provides the peer-to-peer platform API to        this module: If the module is a group, this is its parent group.        If this module is a service, group is the group of which this        service is a part. If the module is an application, group is the        group within which this application runs.    -   assignedID: Assigned identifier. A unique identifier assigned to        this module by its group. If this module is a group, the        assigned identifier is its group identifier. If this module is a        service, then this is the full class identifier of that service        in that group. In one embodiment, the full class identifier        listed in the group's implementation advertisement may be used.        In one embodiment, if this module is a main application of a        peer group, then its assigned identifier may be a full class        identifier of the base class application. In one embodiment, the        role part may be assigned randomly in order to be unique.        Otherwise, in one embodiment, it may be anything, including        null. In one embodiment, a service may find its configuration        parameters indexed under its assigned identifier in the        configuration advertisement, and may update its published        parameters under its assigned identifier in the peer        advertisement.    -   implAdv: The implementation advertisement from which this module        was loaded. In one embodiment, if this module is a subclass of a        standard (base) peer group class, then the <Parm> section of        this advertisement may include a complete list of the services        that this group includes. If the module is an application, the        module may have been loaded directly from its class, bypassing        the implementation advertisement lookup. As a result, there may        not be an implementation advertisement available, in which case        “null” may be passed for this argument. In one embodiment, the        standard peer group may pass an implementation advertisement to        the main application(s).    -   configAdv: The configuration advertisement for this module. As        for assigned identifier and implementation advertisement, this        may be null if the module is an application. In one embodiment,        the standard peer group may pass its configuration advertisement        through to the main application(s).

One embodiment may include an initialization routine for modules inorder to avoid resorting to reflection when loading and initializingmodules. In one embodiment, modules may only include a defaultconstructor, and the initialization routine may serve as a substitute tohaving a constructor with parameters. The initialization routine,followed by a start application routine gets the module running. In oneembodiment, a “stop application” routine may shut down that module. Inone embodiment, after calling the stop application routine, the modulemay be unreferenced and garbage collected. To resume running the module,the module may be loaded from scratch again.

One embodiment may include a “start application” routine in addition toan initialization routine in order to be able to operate on the moduleonce its is fully constructed but before it starts running. What “startsrunning” means may be defined by each module in relation to the effectsof whichever methods the particular module provides that affect itsbehavior.

In one embodiment, services may be registered with the peer group uponreturning from the init routine. In this embodiment, services may beready to have their public methods invoked upon returning from theinitialization routine. In one embodiment, the services may not beobligated to provide full functionality. In one embodiment, publicmethods may fail gracefully if they cannot perform fully. In thisembodiment, services may expect all other services of the group to beavailable from the group's registry upon their start application methodbeing invoked, and to have the public methods of these services eitherfully work or fail nicely. In one embodiment, both the initializationand the start application methods of a module may be required to“return.” In other embodiments, either one or both of these methods maynot be required to return.

Advertisements

In one embodiment, the peer-to-peer protocols may use advertisements todescribe and publish the existence of peer resources. An advertisementmay be defined as a structured, language neutral metadata structure thatnames, describes, and publishes the existence of a peer-to-peer platformresource. Network resources such as peers, peer groups, pipes, andmodules such as services may be represented by advertisements.Advertisements may be used to describe one or more of, but not limitedto, peers, peer groups, pipes, content, rendezvous, and modules such asservices and other types of network resources. Advertisement typesprovided by the peer-to-peer platform may include one or more of, butare not limited to, peer advertisements, peer group advertisements,module class advertisements, module specification advertisements, moduleimplementation advertisements, pipe advertisements, and rendezvousadvertisements. Advertisements may be exchanged as documents inpeer-to-peer protocol messages. One or more of the peer-to-peer platformprotocols may use advertisements to provide information to entitiesinterested in the peer-to-peer resources represented by theadvertisements. Peer-to-peer platform protocols may be used to passadvertisements between peers.

In one embodiment, advertisements may include a series of hierarchicallyarranged elements. The elements may appear in arbitrary order within theadvertisement. Each element may include data or additional elements. Anelement may also have attributes. In one embodiment, attributes arename-value string pairs. An attribute may be used, for example, to storemeta-data that helps to describe the data within the element.

In one embodiment, peer-to-peer platform advertisements may berepresented in the eXtensible Markup Language (XML). Other embodimentsmay use other encodings such as HTM or WML. In one embodiment,advertisements may be specified using a schema definition language suchas the XML Schema Definition Language. In one embodiment, XMLadvertisements may be translated into other encodings such as HTML andWML to allow peers that do not support XML to access advertisedresources.

In one embodiment, advertisements may be used in the peer-to-peerplatform as language-neutral metadata structures. In one embodiment,each software platform binding may describe how advertisements areconverted to and from native data structures such as Java objects or ‘C’structures. Each protocol specification may describe one or more requestand response message pairs. In one embodiment, advertisements may be themost common document exchanged in messages.

Information exchanged between peers may include advertisement documents.In one embodiment, the peer-to-peer platform may advertise documents torepresent all of the peer-to-peer platform resources managed by the coreplatform, such as peers, peer groups, pipes and services. In oneembodiment, the peer-to-peer platform may define a set of coreadvertisements. The peer-to-peer platform may define core advertisementtypes including, but not limited to, one or more of peer advertisements,peer group advertisements, pipe advertisements, service advertisements,content advertisements, and endpoint advertisements. In one embodiment,user-defined advertisement subtypes (for example, using XML schemas) maybe formed from these basic types. Subtypes of the core advertisementsmay be used to add an unlimited amount of extra, richer metadata to apeer-to-peer network. In one embodiment, the peer-to-peer platformprotocols, configurations and core software services operate only on thecore advertisements.

In one embodiment, an advertisement is a markup language structureddocument that names, describes, and publishes the existence of apeer-to-peer platform resource. In one embodiment, peer-to-peer platformadvertisements may be represented in the Extensible Markup Language(XML) and are therefore software platform neutral. XML provides apowerful means of representing data and metadata throughout adistributed system. XML provides universal (software-platform neutral)data because XML is language agnostic, self-describing, strongly-typedand ensures correct syntax. XML advertisements may be strongly typed andvalidated using XML schemas. XML also allows advertisements to betranslated into other encodings such as HTML and WML. This featureallows peers that do not support XML to access advertised resources. Inone embodiment, each document may be converted to and from a platformspecific representation such as a Java object. In one embodiment, peerssupporting the various protocols requiring that advertisements beexchanged in messages may accept only valid XML documents that descendfrom the base XML advertisement types.

Advertisements represented in a markup language such as XML, like anymarkup language document, may be composed of a series of hierarchicallyarranged elements. Each element may include its data and/or additionalelements. An element may also have attributes. Attributes are name-valuestring pairs. An attribute may be used to store metadata, which may beused to describe the data within the element.

FIG. 29A illustrates a peer in a peer-to-peer network publishing anadvertisement according to one embodiment. Peer 200A may include or mayhave access to resources that it may publish. Resources may include, butare not limited to, peers, peer groups, software modules (e.g. services,applications, etc.), content, pipes and pipe endpoints. A resourceadvertisement may include an identifier and a security credential. Theidentifier and security credential may be compared to confirm that theyindicate the same resource when another peer accesses the resource. Inone embodiment, a public key may be associated with the advertisedresource. In one embodiment, the security credential may be a public keysignature.

Peer 200A may generate resource advertisement 808 which may describe howother peers may access the resource. Resource advertisements may beformatted according to platform-independent markup language schemasdefining elements of each type of advertisement (e.g., XML). Peer 200Amay allow other peers access to the resource by publishing advertisement808. In one embodiment, publishing may include sending advertisements toother peers. In FIG. 29A, peer 200A may send advertisement 808 to peers200B and 200C in messages 820A and 820B. Messages 820A and 820B may beformatted according to a peer-to-peer platform protocol. Another peermay discover advertisement 808 by sending a discovery query message thatmay include criteria that the resource corresponding to advertisement808A may match to one or both of peer 200B and peer 200C, and one orboth of peer 200B and peer 200C sending a response message that maycontain advertisement 808 to the other peer.

FIG. 29B illustrates a peer in a peer-to-peer network publishing anadvertisement to a rendezvous peer according to one embodiment. Peer200A may publish advertisement 808A by sending it to rendezvous peer200B in message 820. Rendezvous peer 200B may cache advertisements forother peers to discover. In one embodiment, advertisement 808A mayinclude a time-to-live indicator (TTL). The TTL may indicate a length oftime during which the resource advertisement is valid. When the TTLexpires, peers may no longer have access to the resource advertisement.Another peer may discover advertisement 808A by sending a discoveryquery message that may include criteria that the resource correspondingto advertisement 808A may match to peer 200B, and peer 200B sending aresponse message that may contain advertisement 808 to the other peer.

FIG. 30 illustrates discovering advertisements according to oneembodiment. Peer 200A may broadcast discovery query message 820.Discovery query message 820 may be formatted in accordance with apeer-to-peer platform discovery protocol. Discovery query message 820may include criteria specifying a particular type of resource in whichthe peer is interested. When the discovery query message 820 reaches apeer 200B that has advertisements 808A and 808B for resources matchingthe criteria in the discovery query message, peer 200B may respond bysending peer 200A a response message 822 that may include theadvertisements 808A and 808B. Peer 200A may also receive one or moreresponse messages from one or more other peers. Each of these responsemessages may include advertisements for resources for resources alsomatching the criteria in the discovery query message. After receivingthe resource advertisements, peer 200A may access the correspondingresource. In one embodiment, each resource advertisement may includeinformation describing how to access the particular resourcecorresponding to the resource advertisement.

One embodiment may include module class advertisements, modulespecification advertisements, and module implementation advertisementsthat may be used, for example, in describing and identifying abstractsoftware modules in peer-to-peer networking environments. FIG. 33illustrates a module class advertisement 1010, a module specificationadvertisement 1012, and a module implementation advertisement 1014 for asoftware module according to one embodiment.

In one embodiment, a module class advertisement 1010 may be used todescribe a class of software modules. A module class advertisement 1010may describe an expected local behavior and an expected API for eachpeer-to-peer platform binding that supports the class of softwaremodules. A module class advertisement 1010 may provide a description ofwhat a particular module class identifier 1020 stands for. Module classidentifiers 1020 may be used by a software module or other code on thepeer-to-peer platform to designate software modules upon which thesoftware module or other code depends. In one embodiment, a module classadvertisement 1010 may not provide a completely formal description ofthe module's behavior and API. In one embodiment, a module classadvertisement 1010 may be used to create modules with a similarfunctionality.

The following illustrates an exemplary module class advertisement 1010schema that may be used in embodiments and is not intended to belimiting:

<xs:element name=“MCA” type=“xxxx:MCA”/> <xs:complexType name=“MCA”> <xs:sequence>   <xs:element name=“MCID” type=“xxxx:identifier”/>  <xs:element name=“Name” type=“xs:string” minOccurs=“0”/>   <xs:elementname=“Desc” type=“xs:anyType” minOccurs=“0”/>  </xs:sequence></xs:complexType>where the elements may include one or more of, but are not limited to:

-   -   MCID—Module class identifier 1020 that uniquely identifies the        module class. Each module class may have a unique identifier. In        one embodiment, this is a required element.    -   Name—A name associated with the module class. In one embodiment,        the name is not required to be unique unless the name is        obtained from a centralized naming service that guarantee name        uniqueness. In one embodiment, this is an optional element.    -   Desc—Description. A string that may be used to describe and        search for a module class. In one embodiment, this is an        optional element.

In one embodiment, a module specification advertisement 1012 may be usedto describe the specification of a software module. A modulespecification advertisement 1012 may describe an expected on-wirebehavior and protocol. A module specification advertisement 1012 mayprovide a description of what a particular module specificationidentifier 1022 stands for. A module specification identifier 1022 maybe used by a software module or other code on the peer-to-peer platformto designate a particular network-compatible family of implementationsof a given module class. In one embodiment, module specificationidentifiers 1022 may also be used by a peer group implementation todesignate the components that provide the various services that the peergroup supports. In one embodiment of the peer-to-peer platform, one ormore core peer group services (e.g. discovery, membership, resolver,etc.) may be implemented as software modules.

A module specification advertisement 1012 may also describe how toinvoke and use a software module. In one embodiment, a software modulemay be accessed through an API (application programming interface) ofthe module by locating an implementation of the software module, loadingthe module, and starting the module. In one embodiment, a softwaremodule may be accessed via a pipe (e.g. a peer-to-peer platform pipe asdescribed below) accessed using a pipe advertisement included in thesoftware module's module specification advertisement 1012. In oneembodiment, a software module may be accessed through a proxy moduleaccessed using a module specification identifier 1022 of the proxymodule included in the software module's module specificationadvertisement 1012.

The following illustrates an exemplary module specificationadvertisement 1012 schema that may be used in embodiments and is notintended to be limiting:

<xs:element name=“MSA” type=“xxxx:MSA”/> <xs:complexType name=“MSA”><xs:sequence> <xs:element name=“MSID” type=“xxxx:IDENTIFIER”/><xs:element name=“Vers” type=“xs:string”/> <xs:element name=“Name”type=“xs:string” minOccurs =“0”/> <xs:element name=“Desc”type=“xs:anyType” minOccurs =“0”/> <xs:element name=“Crtr”type=“xs:string” minOccurs =“0”/> <xs:element name=“SURI”type=“xs:anyURI” minOccurs =“0”/> <xs:element name=“Parm”type=“xs:anyType” minOccurs =“0”/> <xs:elementref=“xxxx:PipeAdvertisement” minOccurs=“0”/> <xs:element name=“Proxy”type=“xs:anyURI” minOccurs=“0”/> <xs:element name=“Auth”type=“xxxx:IDENTIFIER” minOccurs=“0”/> </xs:sequence> </xs:complexType>where the elements may include one or more of, but are not limited to:

-   -   MSID—module specification identifier 1022. May uniquely identify        the specification. Each module specification may have a unique        module specification identifier 1022. In one embodiment, this is        a required element.    -   Vers—The version of the specification that this advertisement        advertises. In one embodiment, this is a required element.    -   Name—Name that may be associated with a module specification.        The name may not be required to be unique. In one embodiment,        the name may be obtained from a centralized naming service that        guarantee name uniqueness, and therefore in this embodiment the        name may be unique. In one embodiment, this is an optional        element.    -   Desc—Description. A string that may be used to describe and        search for a module specification. In one embodiment, this is an        optional element.    -   CRTR—Creator. This element designates the creator of this module        specification. In one embodiment, this is an optional element.    -   SURI—Specification URI (unique resource identifier). This        element is a URI that permits the retrieval of a document        containing the module specification that this advertisement        advertises. In one embodiment, this is an optional element.    -   Parm—May include one or more arbitrary parameters that may be        interpreted by each implementation.    -   xxxx:PipeAdvertisement—Identifies pipe advertisement which this        module binds to an input pipe, and which thus may be used to        establish a pipe to a nearby running implementation of this        module specification. In one embodiment, this element name may        be identical to the pipe advertisement document type since the        entire element is an embedded pipe advertisement document. In        one embodiment, this is an optional element.    -   Proxy—Proxy Specification identifier. Module specification        identifier 1022 of a proxy module that may be used in order to        communicate with modules of this specification. Note that the        process may be recursive. The proxy module may be usable via        pipes, or optionally through a subsequent proxy module, and may        require a subsequent authenticator. In one embodiment, this is        an optional element.    -   Auth—Authenticator specification identifier. Module        specification identifier 1022 of an authenticator module that        may be required in order to communicate with modules of this        specification. Note that the process may be recursive. The        authenticator module may be usable via pipes, or optionally        through a subsequent proxy module, and may require a subsequent        authenticator. In one embodiment, this is an optional element.

In one embodiment, a module implementation advertisement 1024 may beused to describe one of the implementations of a module specification.Implementations of a given specification may be searched by the modulespecification identifier 1022. An implementation may be selected by thetype of environment in which it may be used (its compatibilitystatement) as well as by its name, description or the content of itsparameters section.

A module implementation advertisement 1024 may provide a mechanism toretrieve data that may be required in order to execute the moduleimplementation being described. In one embodiment, this information maybe encapsulated in the Code and PURI (Package Uniform ResourceIdentifier) elements. The interpretation of these elements may besubject to the module's compatibility. For example, a standard peergroup implementation of a Java reference implementation may expect the<Code> element to specify a fully qualified Java class name thatdesignates a subclass such as net.xxxx.platform.Module and PURI to bethe URI (Uniform Resource Identifier) of a downloadable package (e.g. ajar file). Other execution environments may expect the code to be inlinewithin the <Code> element or even offer several options.

The following illustrates an exemplary module implementationadvertisement 1024 schema that may be used in embodiments and is notintended to be limiting:

<xs:element name=“MIA” type=“xxxx:MIA”/> <xs:complexType name=“MIA”> <xs:sequence>   <xs:element name=“MSID” type=“xxxx:IDENTIFIER”>  <xs:element name=“Comp” type=“xs:anyType”/>   <xs:element name=“Code”type=“xs:anyType”/>   <xs:element name=“PURI” type=“xs:anyURI”minOccurs=“0”/>   <xs:element name=“Prov” type=“xs:string”minOccurs=“0”/>   <xs:element name=“Desc” type=“xs:anyType”minOccurs=“0”/>   <xs:element name=“Parm” type=“xs:anyType”minOccurs=“0”/>  </xs:sequence> <xs:complexType>where the elements may include one or more of, but are not limited to:

-   -   MSID—module specification identifier 1022. May uniquely identify        the module specification being implemented. In one embodiment,        this is a required element.    -   Comp—Compatibility. An arbitrary element that may describe the        environment in which this module implementation may be executed.        Each framework capable of loading and executing the module may        have its own requirements on the contents of this element. In        one embodiment, this is a required element.    -   Code—This arbitrary element may include anything that is needed        in addition to the package in order to load and execute the code        of this module implementation. In one embodiment, for Java        module implementations, this element may include a fully        qualified class name containing the module's entry points. In        one embodiment, this element may include the entire code.    -   PURI—Package URI (uniform resource identifier). This element is        a URI that permits the retrieval of a package containing the        code of this module implementation. In one embodiment, this is        an optional element.    -   Prov—Provider. The provider of this module implementation.    -   Desc—Description. A string that may be used to describe and        search for a module specification. In one embodiment, this is an        optional element.    -   Parm—Parameter. May include one or more arbitrary parameters        that may be interpreted by the module implementation's code.

The following are descriptions of embodiments of peer advertisements andpeer group advertisements that may be used in embodiments of the systemand method for describing and identifying abstract software modules inpeer-to-peer networking environments.

In one embodiment, a peer advertisement may be used to describe a peer.A peer advertisement may also describe resources the peer may provide toa peer group. One use of a peer advertisement is to hold specificinformation about the peer, including one or more of, but not limitedto, the peer's name, peer identifier, peer group identifier, descriptiveinformation, and registered services. A peer advertisement may alsoinclude endpoint addresses and/or any run-time attributes thatindividual peer services want to publish (such as being a rendezvouspeer for a group). FIG. 6 illustrates the content of a peeradvertisement according to one embodiment.

The following illustrates an exemplary peer advertisement schema thatmay be used in embodiments and is not intended to be limiting:

<xs:element name=“PA” type=“xxxx:PA”/> <xs:complexType name=“PA”> <xs:sequence>  <xs:element name=“PID” type=“IDENTIFIER”/>  <xs:elementname=“GID” type=“IDENTIFIER”/>  <xs:element name=“Name” type=“xs:string”minOccurs=“0”/>  <xs:element name=“Description” type=“xs:anyType”minOccurs=“0”/>  <xs:element name=“Svc” type=“xxxx:serviceParams”minOccurs=“0”               maxOccurs=“unbounded”/>  <xs:sequence></xs:complexType>where the elements may include one or more of, but are not limited to:

-   -   PID—Peer identifier that may uniquely identify the peer. Each        peer may have a unique identifier. In one embodiment, this is a        required element.    -   GID—The peer group identifier. This element may identify        canonically which peer group this peer belongs to.    -   Name—A string that may be associated with the peer. In one        embodiment, the name may not be required to be unique. In one        embodiment, the name may be obtained from a centralized naming        service that guarantees name uniqueness. In one embodiment, this        is an optional element.    -   Description—A string that may be used to index and search for a        peer. In one embodiment, the string is not guaranteed to be        unique. Two peers may have the same keywords. In one embodiment,        this is an optional element.    -   Svc—A service element. In one embodiment, any number of service        elements may be included. In one embodiment, ach of the service        elements may describe the association between a group service        which may be denoted by its module class identifier (the value        of an MCID (module class identifier) element), and arbitrary        parameters encapsulated in a Parm (parameter) element. For        example, all accessible endpoint addresses may be published in        association with the Endpoint Service Module Class Identifier.        The TLS Root certificate may be published under the Peer group        Module Class Identifier (There may be a module class identifier        for a Peer Group as well). The flag that denotes that this peer        is a rendezvous for this group may be published under the        Rendezvous Service module class identifier. In one embodiment,        each service may be responsible for what is published under its        module class identifier. The Service section may also optionally        include an element (e.g., “isOff”) that may be used to indicate        if this service is enabled or disabled. This element may be used        to convey a configuration choice made by the owner of the peer.

The following is another exemplary embodiment of a peer advertisement inXML, and is not intended to be limiting:

<PeerAdvertisement> <Name> name of the peer</Name> <Keywords>searchkeywords </Keywords> <Pid> Peer identifier </Pid> <Services> < Serviceadvertisement> .... </Service advertisement> </Services> <Endpoints><endpoint advertisement> .... <endpoint advertisement> </Endpoint><InitialApp> < Service advertisement> .... </ Service advertisement></InitialApp> </PeerAdvertisement>

This embodiment of a peer advertisement may include, but is not limitedto, the following fields:

-   -   Name: an optional string that can be associated with a peer. In        one embodiment, the name is not required to be unique unless the        name is obtained from a centralized naming service that        guarantees name uniqueness.    -   Keywords: an optional string that may be used to index and        search for a peer. In one embodiment, the string is not        guarantee to be unique. Two peers may have the same keywords.        The keywords string may contain spaces.    -   Peer identifier: uniquely identifies the peer. In one        embodiment, this may be a required element. Each peer has a        unique identifier.    -   Service: a service advertisement element for each service        published on the peer.

Services started on a peer may publish themselves to the peer. In oneembodiment, not all services running on the peer need to publishthemselves.

-   -   Endpoint: an endpoint URI (e.g. tcp://H129.144.36.190:9701 or        http://129.144.36.190:9702) for each endpoint available on the        peer.    -   InitialApp: Optional application/service started when the peer        is booted. A service advertisement is used to describe the        service.

In one embodiment, a peer group advertisement may be used to describe,for a peer group, the group specific information (name, peer groupidentifier, etc.), the membership process, and the available peer groupservices. The peer group advertisement defines the core set of servicesto be used by that peer group. In one embodiment, it may not enforcethat each peer must run each service locally. Rather it defines the setof services that are made available to the peer group. In oneembodiment, a peer group advertisement may be used to describe peergroup-specific resources including one or more of, but not limited to,name, group identifier, description, specification, and serviceparameters.

In one embodiment, the initial creator of the peer group may define whatadvertisements go into the peer group advertisement at creation time.Other peers may get a copy of the peer group advertisement when theydiscover advertisements via the discovery service. In one embodiment,peer group advertisements are immutable objects and new services may notbe added due to java binding. Other embodiments may allow new servicesto be added. In one embodiment, a peer group may provide a registrationservice that allows the dynamic registration of services.

FIG. 7 illustrates the content of a peer group advertisement accordingto one embodiment. The following is an example of one embodiment of apeer group advertisement in XML, and is not intended to be limiting:

<peer group advertisement> <Name> name of the peer group</Name><Keywords>search keywords </Keywords> <Gid> Peer group identifier </Gid<Services> <Service advertisement> ... </Service advertisement></Services> <initialApp> <Service advertisement> ... </Serviceadvertisement> </InitialApp> </peer group advertisement >

This embodiment of a peer group advertisement may include, but is notlimited to, the following fields:

-   -   Name: an optional name that may be associated with a peer group.        In one embodiment, the name is not required to be unique unless        the name is obtained from a centralized naming service that        guarantee name uniqueness.    -   Keywords: an optional string that may be used to index and        search for a peer group. In one embodiment, the string is not        guarantee to be unique. Two peer groups may have the same        keywords.    -   Peer group Id: uniquely identifies the peer group. In one        embodiment, this is a required element. Each peer group has a        unique id.    -   Service: a service advertisement element for each peer group        service available in the peer group. In one embodiment, not all        peer group services need to be instantiated when a peer joins a        peer group. In one embodiment, at least a membership service        should be available, so the membership service may implement a        null authenticator membership.

InitialApp: optional application/service started when a peer is joininga peer group. A service advertisement may be used to describe theservice. The initial application may be started when a peer is joining agroup. Alternatively, it may be left to the joining peer to decide toeither start or not start the peer group initial application.

The following illustrates another exemplary peer group advertisementschema that may be used in embodiments and is not intended to belimiting:

<xs:element name=“PGA” type=“xxxx:PGA”/> <xs:complexType name=“PGA”><xs:sequence> <xs:element name=“GID” type=“xxxx:IDENTIFIER”> <xs:elementname=“MSID” type=“xxxx:IDENTIFIER”/> <xs:element name=“Name”type=“xs:string” minOccurs=“0”/> <xs:element name=“Desc”type=“xs:anyType” minOccurs=“0”/> <xs:element name=“Svc”type=“xxxx:serviceParam” minOccurs=“0” maxOccurs=“unbounded”/></xs:sequence> </xs:complexType>where the elements may include one or more of, but are not limited to:

-   -   GID—This element provides the peer group identifier. The peer        group identifier is the canonical way of referring to a group        and uniquely identifies the peer group.    -   MSID—Peer group specification identifier. This designates the        module that provides the peer group mechanism for the group. The        specification identifier may include an abstraction of that        mechanism. This abstraction may be optionally described by a        module specification advertisement, and one or more        implementations may exist, which may each be described by a        module implementation advertisement. In one embodiment, these        advertisements may all be searched by peer group specification        identifier. In one embodiment, this is a required element.    -   Name—A name that may be associated with the peer group. In one        embodiment, the name is not required to be unique. In one        embodiment, the name may be obtained from a centralized naming        service that guarantee name uniqueness. In one embodiment, this        is an optional element.    -   Desc—This element provides descriptive information that may be        used to index and search for a peer group. In one embodiment,        the content of this element may not be unique. For example, two        peer groups may have the same keywords.    -   Svc—Service. In one embodiment, any number of service elements        may be included. Each service element may describe the        association between a group service denoted by its module class        identifier (the value of an MCID element), and one or more        arbitrary parameters encapsulated in a Parm element. This        optional parameter may only be meaningful to some services. It        may be used to configure a service specifically in relation with        its use by this group. For example, a simple membership service        may find an encrypted password list there. In one embodiment,        this is an optional element.

Once a peer joins a group, that peer may receive (depending again uponmembership configuration) a full membership-level peer groupadvertisement. The full membership advertisement, for example, mightinclude the configuration (required of all members) to vote for newmember approval.

In one embodiment, a pipe advertisement may be used to describe aninstance of a pipe communication channel. A pipe advertisement may beused by a pipe service to create associated input and output pipeendpoints. In one embodiment, a pipe advertisement document may bepublished and obtained using either the core discovery service or byembedding it within other advertisements such as the peer or peer groupadvertisement. Each pipe advertisement may include an optional symbolicname that names the pipe and a pipe type to indicate the type of thepipe (point-to-point, propagate, secure, etc). FIG. 8 illustrates thecontent of a pipe advertisement according to one embodiment. Thefollowing is an example of one embodiment of a pipe advertisement inXML, and is not intended to be limiting:

<PipeAdvertisement> <Name> name of the pipe</Name> <Identifier> Pipeidentifier </ Identifier> <Type> Pipe Type </Type> </PipeAdvertisement>

Embodiments of a pipe advertisement may include, but are not limited to,the following fields:

-   -   Name: an optional name that may be associated with a pipe. In        one embodiment, the name is not required to be unique unless the        name is obtained from a centralized naming service that        guarantee name uniqueness.    -   Pipe identifier: uniquely identifies the pipe. In one        embodiment, this is a required element. Each pipe has a unique        identifier.    -   Type: This is an optional pipe type that may be provided to        specify the quality of services implemented by the pipe. Pipe        types may include, but are not limited to:        -   Unicast: messages may not arrive at the destination, may be            delivered more than once to the same destination, may arrive            in different order.        -   Unicast, unsecure, and unreliable. This type of pipe may be            used to send one-to-one messages.        -   Unicast secure: messages may not arrive at the destination,            may be delivered more than once to the same destination, may            arrive in different order, but are encrypted (e.g. using            TLS). Unicast, secure (e.g. using TLS). This pipe type may            be similar or equivalent to the unicast pipe type, except            that the data is protected using a virtual TLS connection            between the endpoints.        -   Propagate: a propagate (one-to-many) pipe. Diffusion pipes.            This pipe type is used to send one-to-many messages. Any            peer that has enabled an input pipe on a propagate-type pipe            may receive messages that are sent on the pipe.

In one embodiment, a service advertisement may be used to describe apeer-to-peer platform-enabled service. In one embodiment, serviceadvertisements may describe how to activate and/or use the service. Inone embodiment, a peer-to-peer platform-enabled service is a servicethat uses pipes as primary invocation mechanism. To invoke the service,a peer may a message to the associated service pipe. In one embodiment,the core peer group services that each peer group may implement in orderto respond to the messages described for the peer-to-peer platformprotocols are peer-to-peer platform-enabled services and thus may bepublished using service advertisements. The service advertisementdocument may be published and obtained using the peer informationprotocol for peer services, or alternatively using the peer groupdiscovery protocol for peer group services.

In one embodiment, a pipe advertisement and access method fields mayprovide a placeholder for any kind of service invocation schema thatdefines the valid set of XML messages accepted by the service and theassociated message flow. Thus, the peer-to-peer platform protocols maybe agnostic of service invocation and interoperate with any existingframework. A service advertisement access method field may refer to aWSDL (e.g. www.w3.org/TR/wsdl), ebXML (e.g. www.ebxml.org), UPnP (e.g.www.upnp.org) or a client-proxy schema, among others. For example, aWSDL access method may define messages that are abstract descriptions ofthe data being exchanged and the collections of operations supported bythe service using a WSDL schema. In one embodiment, a serviceadvertisement may include multiple access method tags, as there may bemultiple ways to invoke a service. Thus, the peer may ultimately decidewhich invocation mechanism to use. For example, small devices may wantto use a small-footprint mechanism or a service framework they alreadyhave the code for, and larger devices may decide to download aclient-proxy code.

In one embodiment, the access method for services is a schema of validXML messages accepted by the service. In one embodiment, a serviceadvertisement may contain a URL or URI tag to point to a jar file, DLL,or loadable library. A peer may use this to download the code to run theservice, for example if the peer joins the peer group and does not havethe required code to run the service.

One embodiment may provide cross-platform activation of services. A peermay be implemented on a first computing platform. The may discover anadvertisement for service that includes platform-independent activationinstructions for a service implemented on a second computing platform,different from the first computing platform. The peer may carry out theinstructions to activate the service even though their computingplatforms are different. For example, a peer implemented on a MacintoshOSX computing platform may activate a search engine for used carsimplemented on an Intel Windows computing platform.

FIG. 9 illustrates the content of a service advertisement according toone embodiment. The following is an example of one embodiment of aservice advertisement in XML, and is not intended to be limiting:

<ServiceAdvertisement> <Name> name of the Service</Name> <Version>Version identifier </Version> <Keywords>search keywords </Keywords> <Id>Service identifier </Id> <Pipe> Pipe endpoint to access the service</Pipe> <Params> service configuration parameters </Params> <URI>service provider location</URI> <Provider> Service Provider</Provider><AccessMethods> ... </AcessMethods> </ServiceAdvertisement>

Embodiments of a service advertisement may include, but are not limitedto, the following fields:

-   -   Name: an optional name that may be associated with a service. In        one embodiment, the name is not required to be unique unless the        name is obtained from a centralized naming service that        guarantees name uniqueness.    -   Keywords: an optional string that may be used to index and        search for a service. In one embodiment, the string is not        guaranteed to be unique. Two services may have the same        keywords.    -   Service Id: uniquely identifies a service. In one embodiment,        each service has a unique id. In one embodiment, this element        may be required.    -   Version: specifies the service version number. In one        embodiment, this element may be required.    -   Provider: gives information about the provider of the service.        This will typically be a vendor name. In one embodiment, this        element may be required.    -   Pipe: an optional element that specifies a pipe advertisement to        be used to create an output pipe to connect to the service. In        one embodiment, services are not required to use pipes.    -   Params: a list of configuration parameters available to the peer        when invoking the service. In one embodiment, the parameter        field is optional. Parameters may be defined as a list of        strings.    -   URI: This is an optional parameter that may be used to specify        the location of where the code for the service may be found.    -   Access Methods: In one embodiment, at least one access method is        required to specify how to invoke the service. Multiple access        method tags may be used when multiple access methods are        available. The access method tag allows any kind of service        invocation representation to be specified. For example the        access method may be a placeholder for a WSDL or uPnP document        that describes a web service access method.

In one embodiment, a content advertisement may be used to describe acontent document stored somewhere in a peer group. In one embodiment,there are no restrictions on the type of contents that can berepresented. A content may be a file, a byte array, code or processstate, for example. In one embodiment, each item of content may have aunique identifier also known as its canonical name. The uniqueidentifier may include a peer group universal unique identifier (UUID),and also may include another name that may be computed, parsed, andmaintained by peer group members. In one embodiment, the content's nameimplementation within the peer group is not mandated by the peer-to-peerplatform. The name may be a hash code, a URI, or a name generated by anysuitable means of uniquely identifying content within a peer group. Theentire canonical content name may be referred to as a content identifieror content identifier. FIG. 3 illustrates an exemplary contentidentifier according to one embodiment.

FIG. 10 illustrates a content advertisement according to one embodiment.In one embodiment, a size element may be provided for all content itemsand gives the total size of the content. In one embodiment, the size isin bytes. In one embodiment, the size is a long (unsigned 64-bits). Acontent advertisement may also include a MIME (Multi-Purpose InternetMail Extensions) type that describes the MIME type (encoding may bededuced from the type) of the in-line or referenced data. A contentadvertisement may also include a RefID element. If the advertisedcontent is another advertisement (based upon its type), the RefID is thecontent identifier of the referenced content. If the advertised contentis not another advertisement, the RefID element may be omitted.

The following is an example of one embodiment of a content advertisementin XML, and is not intended to be limiting:

<ContentAdvertisement> <Mimetype> name of the pipe</Mimetype> <Size>Pipe identifier </Size> <Encoding> Pipe Type </Encoding> <identifier>Content identifier</identifier> <RefID> Content identifier </RefID><Document> document </Document> </ContentAdvertisement>

Embodiments of a content advertisement may include, but are not limitedto, the following fields:

-   -   identifier: in one embodiment, all contents have a unique id.    -   Size: the total size of the content. In one embodiment, a long        (unsigned 64-bits) represented as a string. “−1” indicates that        the size is unknown.    -   Mimetype: the mime type of the content. The type may be unknown.    -   Encoding: specifies the encoding used.    -   RefID: if the advertised content is about another content, the        RefID specifies the content identifier of the referenced        content.

In one embodiment, an endpoint advertisement may be used to describepeer transport protocols. In one embodiment, a peer may support one ormore transport protocols. In one embodiment, peers may have multiplenetwork interfaces. Typically, there will be one peer endpoint for eachconfigured network interface and/or protocol (e.g. TCP/IP, HTTP). Anendpoint advertisement may be included as a tag field in a peeradvertisement to describe the endpoints available on the member peer. Inone embodiment, an endpoint advertisement document may be published andobtained using either the core discovery service or by embedding itwithin other advertisements such as the peer advertisement. Eachendpoint advertisement may include transport binding information abouteach network interface or transport protocol. Endpoints may berepresented with a virtual endpoint address that may include allnecessary information to create a physical communication channel on thespecific endpoint transport. For example, “tcp://123.124.20.20:1002” or“http://134.125.23.10:6002” are string representing endpoint addresses.FIG. 11 illustrates the content of an endpoint advertisement accordingto one embodiment. The following is an example of one embodiment of anendpoint advertisement in XML, and is not intended to be limiting:

<EndpointAdvertisement> <Name> name of the endpoint</Name> <Keywords>serach string </Keywords> <Address> endpoint logical address </Address></EndpointAdvertisement>

Embodiments of an endpoint advertisement may include, but are notlimited to, the following fields:

-   -   Name: an optional name that may be associated with an endpoint.        In one embodiment, the name is not required to be unique unless        the name is obtained from a centralized naming service that        guarantee name uniqueness.    -   Keywords: an optional string that may be used to index and        search for an endpoint. In one embodiment, the string is not        guarantee to be unique. Two endpoints may have the same        keywords.        Peer-to-Peer Platform Protocols

The peer-to-peer platform protocols may be used to provide and supportad hoc, pervasive, and multi-hop peer-to-peer (P2P) network computing.Using the protocols, peers can cooperate to form self-organized andself-configured peer groups independently of their positions in thenetwork (e.g., edges, firewalls, network address translators, public vs.private address spaces, etc.), and without the need of a centralizedmanagement infrastructure. The peer-to-peer platform protocols may havevery low overhead, make few assumptions about the underlying networktransport and limited requirements of the peer environment, and may beused to deploy a wide variety of peer-to-peer applications and servicesin a highly unreliable and changing network environment.

In one embodiment, the peer-to-peer platform protocols may standardizethe manner in which peers self-organize into peer groups, publish anddiscover peer resources, communicate, and monitor each other. Thepeer-to-peer platform protocols may allow the establishment of a virtualnetwork overlay on top of physical networks, allowing peers to directlyinteract and organize independently of their network location andconnectivity. Embodiments of the peer-to-peer platform protocols may beimplemented on unidirectional links and asymmetric transports.

In one embodiment, the peer-to-peer platform may include core protocolsincluding one or more of, but not limited to, a peer membershipprotocol, a peer discovery protocol, a peer resolver protocol, a peerinformation protocol, a pipe binding protocol, an endpoint routingprotocol, and a rendezvous protocol. In one embodiment, a peermembership protocol may allow a peer to join or leave peer groups, andto manage membership configurations, rights and responsibilities. In oneembodiment, a peer discovery protocol may be used to publish anddiscover resource advertisements. In one embodiment, a peer resolverprotocol may be used to send a generic query to one or more peers, andreceive a response (or multiple responses) to the query. In oneembodiment, a peer information protocol may be used by a peer to obtainstatus information about another peers. In one embodiment, a pipebinding protocol may be used by a peer to establish a virtualcommunication channel or pipe between one or more peers. In oneembodiment, an endpoint routing protocol may be used by a peer todiscover a route (sequence of hops) to send a message to another peer,potentially traversing firewalls and NATs. In one embodiment, arendezvous protocol may be used for propagating messages within a peergroup.

The core peer-to-peer platform protocols may be implemented using acommon messaging layer. This messaging layer binds the protocols tovarious network transports. In one embodiment, the peer-to-peer platformprotocols may be specified as a set of markup language (e.g. XML)messages exchanged between peers. Each software platform bindingdescribes how a message is converted to and from a native datastructures such as a Java object or ‘C’ structure. In one embodiment,the use of markup language messages to define protocols allows manydifferent kinds of peers to participate in a protocol. Each peer is freeto implement the protocol in a manner best suited to its abilities androle. Peer-to-peer platform messages are described previously in thisdocument.

In one embodiment, each of the protocols is independent of the others.In one embodiment, a peer may not be required to implement all of thenetworking protocols. A peer may implement only the protocol that itrequires. For example, a device may have all the advertisements it usespre-stored in memory, so that peer does not need to implement the peerdiscovery protocol. As another example, a peer may use a pre-configuredset of peer routers to route all its messages, hence the peer does notneed to implement the peer endpoint protocol. Instead, the peer sendsmessages to the routers to be forwarded. As yet another example, a peermay not need to obtain or wish to provide status information to otherpeers, hence the peer does not to implement the peer informationprotocol. The same can be said about all of the other protocols. In oneembodiment, a peer may implement only a portion (client-side orserver-side only, for example) of a protocol.

Peers may use the peer-to-peer platform protocols to advertise theirresources and to discover network resources (services, pipes, etc.)available from other peers. Peers may form and join peer groups tocreate special relationships. The peer-to-peer platform protocols mayallow peers to communicate without needing to understand or manage thepotentially complex and dynamic network topologies that are becomingcommon. Peers may cooperate to route messages allowing for full peerconnectivity. The peer-to-peer platform protocols allow peers todynamically route messages across multiple network hops to anydestination in the network (potentially traversing firewalls). Eachmessage may include either a complete or a partial ordered list ofgateway peers through which the message might be routed. If routeinformation is incorrect, an intermediate peer may assist in dynamicallyfinding a new route. In one embodiment, a peer-to-peer platform protocolmessage that is routed through multiple hops may not be assumed to bereliably delivered, even if only reliable transports such as TCP/IP areused through all hops. A congested peer may drop messages at any timerather than routing them.

The peer-to-peer platform protocols may be implemented on a variety ofnetworks including, but not limited to, the Internet, corporateintranets, dynamic proximity networks, home networking environments,LANs and WANs. The peer-to-peer platform protocols may allow thepeer-to-peer platform to be easily implemented on unidirectional linksand asymmetric transports. In particular, many forms of wirelessnetworking do not provide equal capability for devices to send andreceive. The peer-to-peer platform permits any unidirectional link to beused when necessary, improving overall performance and networkconnectivity in the system. Thus, the peer-to-peer platform protocolsmay be easy to implement on any transport. Implementations on reliableand bidirectional transports such as TCP/IP or HTTP may provideefficient bidirectional communications. Even on bidirectionaltransports, communication ability between any pair of peers may at timesnot work equally well in both directions. That is, communicationsbetween two peers will in many cases be able to operate bidirectionally,but at times the connection between two peers may be onlyunidirectional, allowing one peer to successfully send messages to theother while no communication is possible in the reverse direction. Thepeer-to-peer platform unidirectional and asymmetric transport also playswell in multi-hop network environments where the message latency may bedifficult to predict. Furthermore, peers in a peer-to-peer network tendto have nondeterministic behaviors and thus may appear or leave thenetwork very frequently.

In one embodiment, the peer-to-peer platform protocols do not require abroadcast or multicast capability of the underlying network transport.Messages intended for receipt by multiple peers (propagation) may beimplemented using point-to-point communications. In one embodiment, thepeer-to-peer platform protocols may not require periodic messages of anykind at any level to be sent within the network, and thus may notrequire periodic polling, link status sensing, or neighbor detectionmessages, and may not rely on these functions from any underlyingnetwork transport in the network. This entirely on-demand behavior ofthe protocols and lack of periodic activity may allow the number ofoverhead messages generated by the peer-to-peer platform to scale allthe way down to near or at zero, when all peers are stationary withrespect to each other and all routes needed for current communicationhave already been discovered.

In one embodiment, the peer-to-peer platform protocols are defined asidempotent protocol exchanges. The same messages may be sent/receivedmore than once during the course of a protocol exchange. In oneembodiment, no protocol states are required to be maintained at bothends. Due to the unpredictability of peer-to-peer networks, assumptionsmay not be made about the time required for a message to reach adestination peer, and thus in one embodiment the peer-to-peer platformprotocols may not impose timing requirements for message receipt.

The peer-to-peer platform protocols may take advantage of additionaloptimizations, such as the easy ability to reverse a source route toobtain a route back to the origin of the original route.

FIG. 12 illustrates protocols and bindings in a peer-to-peer platformaccording to one embodiment. When the peer-to-peer platform protocolsare implemented using a particular programming language and over aparticular transport protocol, the implementation is an instance of apeer-to-peer platform binding 220, where the peer-to-peer platformprotocols are bound to the language and the transport layer. In oneembodiment, protocol and peer software implementation issues may bedefined in documents specific to the binding. A binding documentdescribes how the protocols are bound to an underlying network transport(such as TCP/IP or UDP/IP) or to a software platform such as Java 222 ora native software platform 224 such as UNIX.

The following describes the transport binding of the peer-to-peerplatform protocols over TCP/IP including the message wire format ofpeer-to-peer platform endpoint messages over a TCP/IP socket connectionaccording to one embodiment. Each TCP/IP message may include a headerand a body. In one embodiment, the format of the header is:

Type Source IP address Source Port Size Option Unused

The type may include information used to either unicast or multicast therequest. The type may indicate whether this is a propagate message, aunicast message, an ACK or a NACK. The port may allow each peer todecide to bind its transport service to a specific port number. The TCPbinding may not require that a specific port be used. The size mayindicate the body size (not including the header). The option may beused to specify the kind of socket connections (uni- or bi-directional)in use. The TCP/IP binding does not require the maintenance of anystates. The normal operation is for one peer to send a TCP/IP packet toanother one, and to close the socket after the packet is sent. This isthe minimum functionality required to implement unidirectional pipes. Inone embodiment, if the receiving end decides to keep the connectionactive (socket “keep alive”), it may return an indicator to the senderto tell the sending end that it is keeping the connection alive. Thesending end may reuse the same socket to send a new packet.

The following describes the transport binding of the peer-to-peerplatform protocols over HTTP including the wire message format for theHTTP binding of the peer-to-peer platform protocols. An HTTP requestformat message may include a header and a body using an HTML format. Forexample:

<HTML> <Code> Header </Code> <Msg> Body </Msg> </HTML>

The header allows the receiving end to determine which message type isreceived. Message types may include request succeeded, request failed,empty (no body) and response (the body is not empty and contains data).The body may be represented as a string in the HTML request document.Connection states that may be used include, but are not limited to:

-   -   Peer Connection: Before a message can be sent to a HTTP server        peer, the HTTP client may be required to send a request for        connection to the other peer. The request for connection message        may use the empty header type. The message may be sent using a        GET request to the following server URL:        http://ip-name:port/reg/client-peerid/. ip-name specifies the IP        of the server peer and the port is the corresponding server port        number (8080 for example). The server replies with an empty        message containing either a request succeeded or request failed        header type. The peer connection message may be used to create a        client session on the receiving peer. The receiving peer may        decide to reject the connection and refuse the client        connection. This corresponds to a client registration.    -   Message Sending: To send a message to another peer server, the        client sends a message of the response type with a message body        part. The server replies with an ok or failed message. The        message is sent to the following URL using the PUT method:        http://ip-name:port/snd/. The server replies with a message        including a request succeeded or request failed header type.    -   Message Retrieving: To retrieve messages from a peer server, the        client may send a GET request message with the empty header tag        to the following URL: http://ipname:port/rec/client-peerid/. The        server replies with may respond with a message failed message or        with a Content message including the messages retrieved.        Peer Discovery Protocol

In one embodiment, the peer-to-peer platform may include a peerdiscovery protocol that may allow a peer to find advertisements on otherpeers. The peer discovery protocol may be used to discover any publishedpeer resources including other peers, peer groups, pipes, softwaremodules (e.g. services and applications) and any other resource that hasan advertisement in the peer-to-peer network. This protocol may be usedto find members of any kind of peer group, presumably to requestmembership. In one embodiment, the peer discovery protocol is thedefault discovery protocol for all peer groups, including the world peergroup. The discovery protocol may be used as a default discoveryprotocol that allows all peer-to-peer platform peers to understand eachother at a very basic level.

The peer discovery protocol may provide, at the lowest level, theminimum building blocks for propagating discovery requests betweenpeers. Thus, the peer discovery protocol may provide the essentialdiscovery infrastructure for building high-level discovery services. Inmany situations, discovery information is better known by a high-levelservice, because the service may have a better knowledge of the topology(firewall traversal), and the connectivity between peers. The peerdiscovery protocol may provide a basic mechanism to discoveradvertisements while providing hooks so high-level services andapplications can participate in the discovery process. Services may beable to give hints to improve discovery (i.e. decide whichadvertisements are the most valuable to cache).

In one embodiment, the peer discovery protocol may be based on webcrawling and the use of rendezvous peers. Rendezvous peers are peersthat offer to cache advertisements to help others peers discoverresources, and propagate requests they cannot answer to other knownrendezvous peers. Rendezvous peers and their use in the discoveryprocess are discussed later in this document.

In one embodiment, custom discovery services may choose to leverage thepeer discovery protocol. In one embodiment, if a peer group does nothave its own discovery service, the peer discovery protocol may be usedas the method for probing peers for advertisements. Rendezvous peers maykeep a list of known peers and peer groups. This list may or may not beexhaustive or timely. A custom discovery service (if it knew that theregion's rendezvous did keep a timely exhaustive list), for example, maydiscover all peers in the region by sending a single message to therendezvous peer.

In one embodiment, peer discovery may be done with, or alternativelywithout, specifying a name for the peer to be located and/or the groupto which peers belong. When no name is specified, all discoveredadvertisements of the requested type may be returned. If a probing peerprovides the name of the peer to be located, a simple translation may berequested that returns that peer's advertisement. Once a peer isdiscovered, ping, status, and capability messages may be sent to its“main” endpoint(s) using a peer information protocol. Peers may exportmore than one endpoint. In one embodiment, each peer designates at leastone primary endpoint to handle the low-level housekeeping protocols suchas the peer discovery protocol and the peer information protocol.

In one embodiment, the peer discovery protocol may be used to probenetwork peer groups looking for peers that belong to specified peergroups. This process may be referred to as screening. Peers may bescreened for membership by presenting each candidate member with a peergroup name (string matched with the peer group advertisement canonicalname). In one embodiment, peers claiming to belong to this group mayrespond, while other peers do not respond. The peer discovery protocolmay be used to discover any type of core advertisement including, butnot limited to: peer advertisements, peer group advertisements, pipeadvertisements and service advertisements.

Peer groups need customizable and adaptable discovery policies. In oneembodiment, the peer-to-peer platform may be policy-agnostic, and mayonly provide the basics for discovery. The basics may include one ormore core discovery protocols including, but not limited to, a propagateprotocol (broadcast within a scope range (subnet or peer groupmembers)), a rendezvous protocol (unicast to a trusted discovery peer)and an invite protocol (reverse discovering).

A discovery policy may be implemented in a discovery service based onthe core discovery protocol. In one embodiment, a discovery service inthe core peer-to-peer platform may be used to discover abstractionsand/or entities in the peer-to-peer network including, but not limitedto, peers, peer groups, peer group policies (group defined services) andpipe endpoints.

In some embodiments of a peer-to-peer platform, the discovery servicemay rely on trusted peers (discovery proxies). The discovery service mayleverage local neighbors (local propagate). The discovery service mayuse rendezvous peers (indexes). The discovery service may leave tracesin discovery proxies (cache). The discovery service may use net crawlingas a last resort (propagate between trusted discovery proxies). In oneembodiment, a discovery service may not discover some entities in thepeer-to-peer network including, but not limited to, content (largescale; in one embodiment, a content management service may be used forcontent discovery), metadata (maintain relationship between data),users, and applications.

Embodiments of a peer-to-peer platform discovery service may leveragesurrounding peers and peer groups, provide meetings points for far awaypeers and groups, use an asynchronous protocol and provide reversediscovery. In one embodiment, the discovery service may be used to findnew neighbor peers and provide the ability for a peer to learn aboutother peer's abilities. Embodiments of a discovery service in thepeer-to-peer platform may provide extensibility, spontaneousconfiguration, adaptive connectivity, a dynamic (i.e. no fixed) networktopology, and the ability to reach the “edge of the Internet” (firewall,and NAT).

Some embodiments of a discovery method in the peer-to-peer platform maynot require centralized naming (e.g. no DNS). In one embodiment, adiscovery service may provide predefined meeting points that may be usedin platform bootstrapping. In one embodiment, the discovery service maysupport a dynamic environment (peers may come and go). In oneembodiment, the discovery service may support an unreliable environment(peers may fail). In one embodiment, the discovery service may help toadapt to a changing environment through viral behavior. In oneembodiment, the discovery service may be used to improve performance asa system ages (increase locality). In one embodiment, the discoveryservice may be used in support of security (change of physicallocation). In one embodiment, a discovery service may be used thatprovides administrationless discovery (zero-admin).

Embodiments of the peer-to-peer platform discovery service may allow apeer to learn about other peers that discover it. In one embodiment, thepeer-to-peer platform discovery service may provide application-managedrendezvous. In one embodiment of the peer-to-peer platform, a peerdiscovery protocol may support a discovery query message and a discoveryresponse message to be used in the peer discovery process.

Peer groups need customizable and adaptable discovery policies. Oneapproach to implementing a discovery policy is to start simple and buildmore complex policies. Embodiments of the peer-to-peer platformdiscovery service may support discovery methods including, but notlimited to:

-   -   Propagate Discovery        -   Unicast to predefined rendezvous        -   Leverage transport dependent multicast (e.g. IP)    -   Unicast Discovery        -   Unicast to known rendezvous for forward propagation        -   May be used for reverse Discovery

In one embodiment, the peer-to-peer platform may not mandate exactly howdiscovery is done. Discovery may be completely decentralized, completelycentralized, or a hybrid of the two. Embodiments of the peer-to-peerplatform may support discovery mechanisms including, but not limited to:

-   -   LAN-based discovery. This is done via a local broadcast over the        subset.    -   Discovery through invitation. If a peer receives an invitation        (either in-band or out-of-band), the peer information contained        in the invitation may be used to discover a (perhaps remote)        peer.    -   Cascaded discovery. If a peer discovers a second peer, the first        peer may, with the permission of the second peer, view the        horizon of the second peer to discover new peers, groups, and        services.    -   Discovery via rendezvous points. A rendezvous point is a special        peer that keeps information about the peers it knows about. A        peer that can communicate via a rendezvous peer, for example via        a peer-to-peer protocol pipe, may learn of the existence of        other peers. Rendezvous points may be helpful to an isolated        peer by quickly seeding it with lots of information. In one        embodiment, a web site or its equivalent may provide information        of well-known peer-to-peer protocol rendezvous points.

In one embodiment, a peer-to-peer platform web of trust may be used. Ina web of trust, a peer group creator may select initial discoveryproxies, and may delegate to new peer members. Any peer, when trusted,can become a discovery proxy. Discovery proxies may propagate requestsbetween each other for net-crawling discovery. New peers may beuntrusted or low-trust peers, and may be typically difficult to find andhave limited discovery range (this may help protect against misbehaviorsand denial of service attacks). Trusted members are easier to discover.Peers may increase their discovery range as they become more trusted(discovery credential). Some peers may not need to discover beyond theirinitial net peer group range.

In one embodiment, a peer may go through a proximity network, which alsomay be referred to as a subnet or region, to try to find (discover)surrounding peers. The Internet includes the concept of subnets that arephysically defined by physical routers that define regions in whichcomputer systems are connected to one another. Within one of theseregions, the peer-to-peer protocol uses multicast or other propagatemechanism to find peers. In one embodiment, a propagate discoverymechanism may be provided where one peer can propagate a discoveryrequest through a local subnet. Peers that are in the subnet may respondto the discovery request. The propagate discovery mechanism may provideprimarily close range discovery. In one embodiment, only peers that arein the same physical subnet (region) may respond. “Propagate” is at theconceptual level. Multicast is implemented by TCP/IP to providepropagate capabilities. Other transports may use other methods toimplement propagate. For example, Bluetooth provides a differentimplementation of propagate which is not multicast.

The core discovery protocol may provide a format for a local peer tosend a propagate message (a request to find information about otherpeers or peer groups in its local region or subnet) and a format for aresponse message. A propagate may ask who is there (what peers are inthe subnet). One or more peers may decide to respond. Other peers on thesubnet may choose not to respond if they do not want to be discovered bythe requesting peer. The response message may indicate that a peer isthere and that the requesting peer may communicate with it if it wantsmore information. In one embodiment, the core peer-to-peer platform maydefine the format of the discovery requests and responses as part of thepeer discovery protocol. In one embodiment, the messages may be XMLmessages.

One embodiment of a peer-to-peer platform may provide a bootstrappingprocess for peers. In one embodiment, a new peer may not know any peersor peer groups when bootstrapped. When bootstrapping, the peer may issuea peer discovery propagate message. The new peer is looking for one ormore peers in the subnet. The new peer needs to reach some level ofconnectivity in order to support higher-level operations. Fromdiscovered peers, the new peer may acquire information needed to allowthe new peer to go further in its bootstrapping process. For example,the new peer may send messages to another peer requesting information onservices that the other peer may be aware of that the new peer needs forbootstrapping.

When the new peer discovers another peer or peers, it may attempt todiscover peer groups. This process may be similar to the peer discoveryprocess described above. The new peer may send (e.g. propagate) anotherdiscovery message that is configured to discover peer groups. Peers inthe proximity network (region) that are aware of a peer group or peergroups may respond to the peer group discovery message, and may returninformation on the peer group(s) (e.g. peer group advertisements) ofwhich they are aware. The new peer may use this information to determinea peer group or peer groups that it may be interested in joining.

In one embodiment, a peer group may be configured so that only a subsetof peers within a group may have the capabilities to respond to peergroup discovery messages and to provide information about the peer groupto inquiring peers.

Peer and peer group discovery may both be implemented by the peerdiscovery protocol. Peer and peer group discover are more or less at thesame level in the peer-to-peer platform. In one embodiment, peerdiscovery may use a message that indicates the discovery is looking forpeers, and peer group discovery may use a similar message that indicatesthe discovery is looking for peer groups.

In one embodiment, the peer discovery protocol may be required to beimplemented in a peer platform, and thus all peers will have the servicerunning. When one peer sends (e.g. propagates) a request, then areceiving peer must send a response, unless it is configured to notrespond to at least some requests from at least some peers based uponconfiguration parameters. In another embodiment, peers may beimplemented without the peer discovery protocol. In other words, in thisembodiment, peers are not required to implement the peer discoveryplatform. For example, on some smart devices, peer information and/orpeer group information may be preconfigured into the device, and sobootstrapping may be performed on these devices without having toinitiate a peer discovery.

Embodiments of the peer-to-peer platform may implement a discoverymechanism that is more suited for long-range discovery than thepropagate method described above. In one embodiment, rendezvous peersmay be used in discovery. A rendezvous peer may be described as ameeting point where peers and/or peer groups may register to bediscovered, and may also discover other peers and/or peer groups, andretrieve information on discovered peers and/or peer groups. In oneembodiment, a peer (any peer) in a peer group may decide to become ormay be appointed or elected as a rendezvous peer in the group. Therendezvous peer may be advertised as a meeting point, and may bepredefined on peers so that, for example, the peers, when starting up,may know to go to the rendezvous peer to find information about thepeer-to-peer network. Rendezvous peers may act as information brokers orcentralized discovery points so that peers can find information in aneasy and efficient manner. As a peer group grows, a peer may become arendezvous peer in the group. In one embodiment, a network of rendezvouspeers may be constructed that may help to provide long-range discoverycapabilities. A rendezvous peer may be aware of at least some of theother rendezvous peers in the network, and a discovery message from apeer may be forwarded from a first rendezvous peer to a second, and soon, to discover peers and/or peer groups that are “distant” on thenetwork from the requesting peer.

Rendezvous peers may offer to cache advertisements to help others peersdiscover resources, and may propagate (forward) requests they cannotanswer to other known rendezvous peers. In one embodiment, a rendezvouspeer implements at least one of these two functions. The servicesprovided by a rendezvous peer may be different than message routing.Message routing is performed at a lower level involving multi-hopsconnections to send a message between any peers in the network. In oneembodiment, the forwarding of a request between two rendezvous peers mayinvolve routing to propagate a request between two rendezvous, but thisis transparent to the rendezvous service and done underneath.

In one embodiment, rendezvous peers may forward requests between eachother. A rendezvous may be typically connected to a few other rendezvouspeers. There may be as many rendezvous peers as peers in a peer group.Not every peer may be a rendezvous (e.g. if a peer has no cachingcapabilities or is isolated behind a firewall). In one embodiment, onlyrendezvous peers may forward a discovery request to another rendezvouspeer. This restriction may serve to limit and control the exponentialgrowth of request propagations within the network. Rendezvous peers maythus provide a simple throttle mechanism to control the propagation ofrequests. In one embodiment, sophisticated rendezvous peers may bedeployed to filter and distribute requests for the best usage of networkresources.

In one embodiment, a peer may be pre-configured with a pre-defined setof rendezvous peers. These bootstrapping rendezvous may help the peerdiscover enough network resources (peers, rendezvous, services) as itneeds to support itself. In one embodiment, the pre-configuredrendezvous are optional. A peer may be able to bootstrap by findingrendezvous or enough network resources in its proximity environment. Ifa peer does not know the information, it may ask the surrounding peers(hop of 1) if they know the answer. One or more peers may already havethe answer. If no surrounding peers know the answer, the peer may askits rendezvous peers to find advertisements. Peers are recognized asrendezvous peers in their peer advertisements. When a peer discovers anew peer, it can determine if this peer is a rendezvous. A peer may notbe required to use all the rendezvous peers that it has discovered.

Rendezvous peers may forward requests between themselves. The discoveryprocess continues until one rendezvous peer has the answer or therequest dies. There is typically a Time To Live (TTL) associated withthe request, so it is not infinitely propagated. As an example, supposea peer A is attempting to discover a resource R on the network. Peer Aissues a discovery request specifying the type (peer, peer group, pipe,service) of advertisements it is looking for. To initiate the Discovery,peer A sends a discovery request message as a single propagate packet toall its available endpoints. The packet may contain the requested peeradvertisement, so the receiving peer can respond to the requester. Eachdiscovery request identifies the initiator, and a unique requestidentification specified by the initiator of the request. When anotherpeer receives the discovery request (assume peer B in this example), ifit has the requested R advertisement, it will return to peer A theadvertisement for R in a discovery response message. If Peer A does notget response from its surrounding peers (hop of 1), Peer A may send therequest to its known rendezvous peers. If the rendezvous peers do nothave the advertisement, they can propagate the request to all otherrendezvous peers they know. When a rendezvous receives a respond to arequest, the rendezvous may cache the R advertisement for future usage,before sending it to the requester.

In one embodiment, the peer rendezvous capabilities may be embedded inthe core discovery protocol of the peer-to-peer platform. Rendezvouspeers may be protocol-based, and may broker more information than nameservers that typically only broker names of entities. In one embodiment,a rendezvous peer may maintain indexes for entities in the peer-to-peerplatform including peers, peer groups, and advertisements. Indexes maybe dynamic indexes which may grow as the peer group community grows andmore peers join. As a group joins, some peers may decide to becomerendezvous peers to help peers connect with other peers in the group.

The rendezvous peer is at the peer level. A rendezvous peer is not a“service”. A rendezvous peer may be used as part of an infrastructure toconstruct services such as a DNS or other centralizing and indexservices. In one embodiment, services may interact with a rendezvouspeer to obtain and/or manipulate information stored on the rendezvouspeer to perform some task to make the system act more efficiently.

In a network of peers, some peers may elect themselves, through thediscovery protocol, to become rendezvous peers. A rendezvous peer mayact as a broker or discovery message router to route discovery messagesto the right place. In other words, a rendezvous may act to routediscovery requests to the right rendezvous peers. For example, arendezvous peer may receive a message requesting information about peersthat are interested in baseball. The rendezvous peer may know of anotherrendezvous peer that specializes in information about baseball. Thefirst rendezvous peer may forward or route the message to the secondrendezvous peer. In one embodiment, rendezvous peers may maintainconnections to other rendezvous peers in order to provide discovery androuting functionality.

Rendezvous peers may support long-range discovery. For example, a firstpeer is at a remote location from a second peer. For one of these peersto find the other with a mechanism such as web crawling may be timeconsuming, since there maybe a lot of “hops” between the two peers.Rendezvous peers may provide a shortcut for one of the peers to discoverthe other. The rendezvous peer, thus, may serve to make the discoveryprocess, in particular long-range discover, more efficient.

A peer-to-peer network may be dynamic. Peers and peer groups can comeand go. Dynamic identifiers (addresses) may be used. Thus, routesbetween peers need to be dynamic. Rendezvous peers may provide a methodfor route discovery between peers that allows routing in thepeer-to-peer network to be dynamic. In this method, the rendezvous peersmay perform route discovery for peers when the peers send discoverymessages to the rendezvous peers or when a peer is attempting to connectto another peer or peer group that is not in the local region of thepeer. This method may be transparent to the requesting peer.

In one embodiment, the rendezvous peers may be able to cacheadvertisements. An advertisement may be defined as metadata ordescriptions of a resource. An advertisement may include informationnecessary for an entity to connect to or use the resource, for example aservice advertisement may include information for connecting to andusing the service. Advertisements may be published to allow otherentities to discover them. The rendezvous peer may provide the abilityfor services and applications to store and cache temporary, e.g. via alease mechanism, advertisements. This may used, for example, when oneservice needs to connect to another service, and needs the pipe endpointor communication channel that may be used to connect to the service. Thepipe endpoint may be included in a service advertisement published on arendezvous peer. Thus, in one embodiment, the rendezvous peer providesthe ability for peers, peer groups, services and applications toadvertise pipe endpoints and to discover pipe endpoints of services andapplications.

In one embodiment, the rendezvous protocol may use an index cache (e.g.on a peer serving as a rendezvous proxy). FIG. 13 illustrates discoverythrough a rendezvous peer according to one embodiment. Rendezvous proxy206 may cache peer 200 and peer group 210 information for peer groups210A and 210B. Peers 200 in each peer group 210 may then discover eachother through rendezvous proxy 206. Rendezvous proxy 206 may itself be apeer and may be a member in one or more peer groups 210. In oneembodiment, access to rendezvous proxies 206 may be restricted to peerswith rendezvous access privileges. In this embodiment, non-trusted peers(peers without access privileges) may access rendezvous proxies 206through trusted peers 200 within their peer group 210, or alternativelythrough other local peers in other peer groups. In one embodiment, therendezvous protocol may be used across subnets (configurable at the peergroup level). In one embodiment, the rendezvous protocol may be usedacross/through firewalls (e.g. gateways).

In one embodiment, the peer-to-peer platform may include a propagatepolicy for use in discovery. FIG. 14 illustrates discovery throughpropagate proxies according to one embodiment. In one embodiment,discovery proxy 208 may control propagation of discovery messages. InFIG. 14, discovery proxy 208 may receive discovery messages from peers200 in peer group 210A and propagate the messages to peers in othergroups such as peer group 210B. In one embodiment, access to discoveryproxies 208 may be restricted to peers with discovery proxy accessprivileges. In this embodiment, non-trusted peers (peers without accessprivileges) may access discovery proxies through trusted peers 200within their peer group 210, or alternatively through other local peersin other peer groups. In one embodiment, propagation may be controlledusing TTL (time to live). In another embodiment, propagation may becontrolled using message counts. In one embodiment, the propagate policymay be used for subnet TCP/multicast (platform configurable). In oneembodiment, the propagate policy may support HTTP gateways (platformconfigurable). In one embodiment, the propagate policy may be usedthrough firewalls (e.g. need peer activation behind firewalls).

In one embodiment, the peer-to-peer platform may include an invitepolicy. In one embodiment, the invite policy may support the adding ofnew peers and peer groups (e.g. publish advertisements).

In one embodiment, the peer-to-peer platform may allow the persistentlocal peer caching of discovery information. In this embodiment, a peermay be allowed to cache advertisements discovered via the peer discoveryprotocol for later usage. Caching may not be required by thepeer-to-peer platform, but caching may be a useful optimization. Thecaching of advertisements by a peer may help avoid performing a newdiscovery each time the peer is accessing a network resource. In ahighly transient environment, performing the discovery may be necessary.In a static environment, caching may be more efficient.

In one embodiment, the peer-to-peer platform may support trusteddiscovery peers. In one embodiment, the peer-to-peer platform may usediscovery credentials. In one embodiment, the peer-to-peer platform mayallow credential delegation. In one embodiment, the peer-to-peerplatform may support propagate proxies. In one embodiment, a propagateproxy may support TTL/message counts. TTL stands for Time To Live (howlong the request lives in the system). In one embodiment, a propagateproxy may support net crawling. In one embodiment, a propagate proxy mayprovide “smart above” routing.

In one embodiment, a peer may not initiate a new discovery request untilthe minimum allowable interval between discoveries is reached. Thislimitation on the maximum rate of discoveries may be similar to themechanism required by Internet nodes to limit the rate at which ARPrequests are sent for any single target IP address. The maximum rate maybe defined by each specific implementation transport bindings andexported to the application.

FIG. 15 illustrates using messages to discover advertisements accordingto one embodiment. A message or messages may be used to get all known,reachable advertisements within a region on the network. In oneembodiment, this list may not be guaranteed to be exhaustive, and may beempty. Named peers may also be located using the peer discoveryprotocol. A message may include a peer group credential of the probing(requesting) peer that may identify the probing peer to the messagerecipient. The destination address may be any peer within a region (apropagate message 230) or alternatively a rendezvous peer (a unicastmessage 232). The response message 234 may return one or moreadvertisements (e.g. peer advertisements and/or peer groupadvertisements) that may include “main” endpoint addresses which may beconverted to a string in the standard peer endpoint format (e.g. URI orURL) and also may include a network transport name.

In one embodiment, the peer discovery protocol may not guarantee peersthat receive a query will respond to the query, nor does it mandate thatthe number of advertisements requested will be honored. In thisembodiment, a best effort is made at matching the query to results inthe respondent's cache. In one embodiment, the peer discovery protocoldoes not guarantee that a response to a discovery query request will bemade. In one embodiment, responding to a discovery query request isoptional. A peer may not be required to respond to a discovery queryrequest.

In one embodiment, the peer discovery protocol does not require areliable transport. Multiple discovery query requests may be sent. None,one, multiple pr redundant responses may be received. In one embodiment,the peer discovery protocol may utilize the resolver protocol to routequeries and responses. The tasks of propagating and re-propagating aquery to the next set of peers may be delegated to the resolver service.

In one embodiment, a peer may receive a discovery response that is not aresponse to any discovery query initiated by the peer. This mechanismmay provide the ability to remote publish a resource. In one embodiment,the peer discovery protocol may provides a mechanism for services toquery the network for peer-to-peer resources and receive responses. Inone embodiment, the peer discovery protocol may be used to take care ofsome or all messaging aspects, caching, and expiring advertisements.

In one embodiment, a discovery query message may be used to send adiscovery request to find advertisements (e.g. for peers or peergroups). The discovery query may be sent as a query string (attribute,value) form. A null query string may be sent to match any results. Athreshold value may be included to indicate the maximum number ofmatches requested by a peer. The following is an example of oneembodiment of a discovery query message in XML, and is not intended tobe limiting:

<DiscoveryQuery> <Credential> Credential </Credential> <QueryID> queryid</QueryID> <Type> request type (e.g. PEER, PEER GROUP, PIPE, SERVICE,CONTENT) </Type> <Threshold> requested number of responses </Threshold><PeerAdv> peer advertisement of requestor </PeerAdv> <Attribute>attribute </ Attribute> <Value> value </Value> </DiscoveryQuery>

Embodiments of a discovery query message may include one or more of, butare not limited to, the following fields:

-   -   Credential: The credential of the sender.    -   QueryID: Query identifier.    -   Type: specifies which advertisements are returned.    -   Threshold: specifies the maximum number of advertisements that        each responding peer should provide. The total number of results        received may depend on the number of peers that respond and the        advertisements they have. In one embodiment, if <Type> indicates        peer advertisements and <Threshold> is a particular value        (e.g. 0) then the query is to collect peer advertisements of        respondents. Therefore, any peer should respond to such a query,        even though no results are to be included.    -   PeerAdv: if present, peer advertisement of the requester.    -   Attribute: specifies the query attribute.    -   Value: specifies the query value.

In one embodiment, the value is only present if the attribute ispresent. Both the attribute and value may be omitted. In one embodiment,both attribute and value must either both be present or absent. In oneembodiment, if attribute and value are absent, then each respondent maysupply a random set of advertisements of the appropriate type up to<Threshold> count.

In one embodiment, only advertisements including an element with a namematching <Attribute> and that also includes a value matching <Value> areeligible to be found. In one embodiment, <Value> may begin and/or endwith an indicator such as a special character (e.g. “*”). This indicatesthat <Value> will match all values that end with or beginning with, orcontain the rest of the string. If <Value> includes only the indicator(e.g. “*”), the result may be unspecified. Some implementations maychoose not match any advertisement for a <Value> including only theindicator.

In one embodiment, a discovery response message may be used to send adiscovery response message to answer a discovery query message. Thefollowing is an example of one embodiment of a discovery responsemessage in XML, and is not intended to be limiting:

<DiscoveryResponse> <Credential> Credential </Credential> <QueryId>query id</QueryId> <Type> request type (e.g. PEER, GROUP, PIPE, SERVICE,CONTENT) </Type> <PeerAdv> peer advertisement of the respondent</PeerAdv> <Attribute> Attribute </Attribute> <Value> value </Value><Count> count </Count> <Responses> (peer, peer group, pipe, service orcontent advertisement response) </Responses> <............> <Responses>(peer, peer group, pipe, service or content advertisement response)</Responses> </DiscoveryResponse>

Embodiments of a discovery response message may include one or more of,but are not limited to, the following fields:

-   -   Credential: The credential of the sender.    -   QueryID: Query identifier.    -   Type: The type of the advertisements returned in the <Response>        element(s).    -   Count: If present, the number of <Response> element(s) included        in this response message.    -   PeerAdv: If present, the advertisement of the respondent. May        include an expiration attribute that indicates the associated        relative expiration time in milliseconds.    -   Attribute: specifies the query attribute.    -   Value: specifies the query value.    -   Responses: advertisement responses. The advertisements may be,        for example, peer, peer group, pipe, content or software module        (e.g. service) advertisements. In one embodiment, each may        include an Expiration attribute that indicates an associated        relative expiration time in milliseconds.

In one embodiment, the value tag is only present if the Attribute tagfield is present. Both the Attribute and Value tag may be omitted.

In one embodiment, if an advertisement document (e.g. an XML document)is embedded into another document (e.g. XML document), the documentseparators must be dealt with. For XML documents, his may be done usingthe standard XML escaping rules. For example, ‘<’ becomes ‘&lt;’ ‘>’becomes ‘&gt;’ and ‘&’ becomes ‘&amp’.

Reverse Discovery

Reverse discovery means that, in a peer-to-peer network, when a firstentity (e.g. a peer) discovers a second entity (e.g. another peer), thesecond entity may also discover the first entity from the discoveryinitiated by the first entity. This may also be referred to as “mutualdiscovery”. In most traditional systems, discovery is typicallyone-directional. In the peer-to-peer world, reverse discovery isimportant because, by definition, all “peers” are equal (i.e. it istypically not a hierarchical system). In one embodiment, there may bedifferent levels of discovery for peers. For example, a peer may beconfigured to remain anonymous when discovering other peers or to alwayssupport reverse discovery. In one embodiment, a peer initiating adiscovery may also be configured to deny discovery to another peer ifthe other peer is configured or chooses to remain anonymous. In oneembodiment, a peer may also be configured to or may choose to denydiscovery by other peers that wish to remain anonymous.

Invitations

One embodiment of the discovery protocol may also provide methods bywhich a peer can “advertise” itself, for example when joining apeer-to-peer network. For example, a peer may send an email message, bytelephone, by “traditional” mail, or by other methods to other peers itdiscovers or is preconfigured to know about to advertise its presenceand willingness to be contacted by other peers. This is done outside ofthe discovery method, and may be performed by any external medium. Apeer who receives an invitation from a peer may have a capability to addor enter the new peer to a list or database of peers that it knowsabout. When the peer later restarts, these peers may be among thepreconfigured peers that the peer knows about. In one embodiment, a peermay have a “notify” or “invitation” interface to allow a user toinitiate invitations. In one embodiment, the peer-to-peer platform mayprovide import and export capabilities for invitations. In oneembodiment, the invitations may be implemented as documents external tothe peer-to-peer system that may be exported from one peer and importedinto another peer. In one embodiment, the invitations may be in a formatthat enables the exporting and importing. In one embodiment, theinvitations may be in XML format. In one embodiment, an interface may beprovided to allow the manual entering of invitation information.Importing the invitation may create a peer-to-peer platform documentthat may then be used by the peer. The format of exported documents maydepend on the platform on which the peer is implemented.

Rendezvous Protocol

One embodiment may include a rendezvous protocol that may be responsiblefor propagating messages within a peer group. While different peergroups may have different means to propagate messages, the rendezvousprotocol defines a protocol that enables peers to connect to services(propagate messages to other peers and receive propagated messages fromother peers) and to control the propagation of messages (TTL, loopbackdetection, etc.).

One embodiment may include a rendezvous advertisement that may be usedto describe a peer that acts as a rendezvous peer for a given peergroup. Rendezvous advertisements may be published and retrieved, so thatpeers that are looking for rendezvous peers can find them. In oneembodiment, a rendezvous advertisement may include a name element thatmay be associated with the rendezvous peer. This may be the peer name.In one embodiment, the name element is optional. In one embodiment, arendezvous advertisement may include a rendezvous group identifierelement that includes the peer-to-peer platform identifier of the peergroup for which the peer is a rendezvous. In one embodiment, thiselement is required. In one embodiment, a rendezvous advertisement mayinclude a rendezvous peer identifier element that may include thepeer-to-peer platform identifier of the rendezvous peer. In oneembodiment, this element is required.

Rendezvous peers may be used to re-propagate messages they havereceived. A peer may dynamically become a rendezvous peer and/or maydynamically connect to a rendezvous peer. In one embodiment, theconnection between a peer and a rendezvous peer may be achieved by anexplicit connection, associated to a lease. In one embodiment, thisconnection may be performed by sending messages using the endpointprotocol. Each rendezvous protocol may be listening on an endpointaddress with a service name and service parameter (e.g. peer groupidentifier).

In one embodiment, one or more queries and responses may be defined bythe rendezvous protocol in order to establish connections. A leaserequest may be sent by a peer that desires to connect to a givenrendezvous. In one embodiment, the lease request may not include anindication of the amount of the lease; the rendezvous will give whateveramount it determines is appropriate. In one embodiment, a rendezvousthat grants a lease may return a lease granted message. This message issent by a rendezvous that is granted a lease to a given client. Theamount of time the lease is granted may be included in the message. Inone embodiment, a lease may be canceled by either party at any time ifnecessary or desired. A lease cancel request may be sent by a client toa rendezvous in order to cancel an existing lease. The rendezvous mayreply with a lease cancelled message.

In one embodiment, the peer resolver protocol resides on top of therendezvous protocol. In this embodiment, the peer resolver protocol isnot used to send these messages. In one embodiment, the rendezvousprotocol may reside on top of the endpoint routing protocol, which maybe used to send rendezvous protocol messages.

In one embodiment, the rendezvous protocol is responsible forcontrolling the propagation of messages. In one embodiment, therendezvous protocol may propagate a message unless of the followingconditions is detected:

-   -   Loop: if a propagated message has already been processed on a        peer, it is discarded.    -   TTL: propagated messages are associated with a Time To Live        (TTL). Each time a propagated message is received on a peer, its        TTL is decreased by one. When the TTL of a message drops to        zero, the message is discarded.    -   Duplicate: each propagated message is associated with a unique        identifier. When a propagated message has been duplicated, and        has already been received on a peer, duplicates are discarded.

In one embodiment, propagation control may be performed by embedding amessage element within each propagated message that may include one ormore of, but is not limited to, the following elements: a messageidentifier, a destination name, a destination parameter, a TTL, and apath.

In one embodiment, when a peer wants to connect to a Rendezvous Peer, itsends a lease request message with a connect message element whichincludes its peer advertisement. When a rendezvous peer grants a lease,it sends a lease granted message to the source of the lease request. Inone embodiment, a lease granted message may include one or more of, butis not limited to, the following elements:

-   -   A connected lease element that includes (e.g. in a String        representation) the time in milliseconds the lease is granted        for. In one embodiment, this is a required element.    -   A connected peer element that includes the peer identifier of        the rendezvous peer that has granted the lease. In one        embodiment, this is a required element.    -   A rendezvous advertisement reply element that includes the peer        advertisement of the rendezvous peer that grants the lease. In        one embodiment, this is an optional element.

In one embodiment, when a peer desires to cancel a lease, it sends alease cancel request with a disconnect message element that includes thepeer advertisement of the peer which is requesting to cancel the lease.

Peer Resolver Protocol

In one embodiment, the peer resolver protocol may be used to disseminategeneric queries to one or multiple handlers within a peer group andidentify matching responses. Each query may be addressed to a specifichandler name. In one embodiment, this handler name may define theparticular semantics of the query and its responses, but is notassociated with any specific peer. A given query may be received by anynumber of peers in the peer group, possibly all, and processed accordingto the handler name if such a handler name is defined on that peer. Inone embodiment, the peer resolver protocol may provide a genericquery/response infrastructure for building high-level resolver services.In many situations, a higher-level service may have a better knowledgeof the group topology. In one embodiment, the peer resolver protocol mayuse a rendezvous service to disseminate a query to multiple peers orunicast messages to send queries to specified peers.

In one embodiment, the peer resolver protocol may allow a peer to sendsimple, generic search queries to one or more peer services. In oneembodiment, only those peers that have access to data repositories andthat offer advanced search capabilities typically implement thisprotocol. Each service may register a handler in the peer group resolverservice to process resolver query requests. Resolver queries may bedemultiplexed to each service. Each service may respond to a peer via aresolver response message. It is important to point the differencesbetween the peer discovery protocol and the peer resolver protocol. Thepeer discovery protocol is used to search for advertisements tobootstrap a peer, and discover new network resources. The peer resolverprotocol is a generic service that services query protocols. The peerresolver protocol may be used by a service on a peer to interact with aservice on another peer.

The peer resolver protocol may enable each peer to send and receivegeneric queries to find or search for peer, peer group, pipe or servicespecific information such as the state of a service or the state of apipe endpoint. In one embodiment, each resolver query may have a uniqueservice handler name to specify the receiving service, and a querystring to be resolved by the service. In one embodiment, the peerresolver protocol may provide a generic mechanism for peers to sendqueries and receive responses. In one embodiment, the peer resolverprotocol may remove the burden for registered message handlers by eachservice and set message tags to ensure uniqueness of tags. In oneembodiment, the peer resolver protocol may be used to take care of someor all messaging aspects, caching queries and responses and forwardingqueries, based on the invoker's decision. In one embodiment, the peerresolver protocol may ensure that messages are sent to correct addressesand peer groups. In one embodiment, the peer resolver protocol mayperform authentication and verification of credentials and the droppingof rogue or incorrect messages.

FIG. 16 illustrates one embodiment of using peer resolver protocolmessages between a requesting peer 200A and a responding peer 200B. Aresolver query message 236 may be used to send a resolver query to anamed handler on one or more peers 200 that are members of the peergroup. In one embodiment, a resolver query message 236 may be used tosend (unicast) a resolver query request to a service on another member200B of a peer group. In one embodiment, the resolver query may be sentas a query string to a specific service handler. In one embodiment, eachquery has a unique identifier. The query string may be any string thatmay be interpreted by the targeted service handler. A resolver responsemessage 238 may be sent (unicast) to the requesting peer 200A by theservice handler. The following is an example of one embodiment of aresolver query message in XML, and is not intended to be limiting:

<ResolverQuery> <Credential> Credential </Credential> <HandlerName> nameof handler </HandlerName> <SrcPeerID> source peer identifier</SrcPeerID> <QueryID> incremental query identifier </QueryID> <Query>query string </Query> </ResolverQuery>

Embodiments of a resolver query message may include, but are not limitedto, the following fields:

-   -   Credential: The credential of the sender    -   HandlerName: service the query needs to be passed    -   SrcPeerID: The identifier of the peer originating the query        (e.g. a URN)    -   Queryld: Query identifier    -   Query: query string

A resolver response message may be returned in response to a resolverquery message. The following is an example of one embodiment of aresolver response message in XML, and is not intended to be limiting:

<ResolverResponse> <Credential> Credential </Credential> <HandlerName>name of handler </HandlerName> <QueryID> query identifier </QueryID><Response> response </Response> </ResolverResponse>

Embodiments of a resolver response message may include, but are notlimited to, the following fields:

-   -   Credential: The credential of the respondent    -   QueryID: Query identifier of the query to which this is a        response    -   HandlerName: Specifies how to handle the response; e.g. service        the query needs to be passed to    -   Response: response string including the response(s)

In one embodiment, the peer resolver protocol communicates by exchangingendpoint messages. Endpoint addresses specify a handler name. The peerresolver protocol attaches a listener by that name to the endpointservice.

In one embodiment, peer resolver protocol implementations may use thesame scheme for building their handler names. The convention used by allservices of the world peer group may use the concatenation of theservice name, the peer group identifier, and a value unique within theservice.

The handler name in peer resolver protocol messages may perform a rolesimilar to that of the handler name in endpoint message addresses: it isa demultiplexing key that specifies how, by which higher-level protocol,or by which module, the message is to be processed. In one embodiment,the users of the peer resolver protocol are typically services. Eachinstance of a given service (one per peer per group that uses thisservice) generates a handler name that is unique on its peer, but willbe identical for the instances of this service on other peers. In oneembodiment, this may be achieved by concatenating the service name(which is unique in the group), the group identifier, which is unique inthe peer, and an additional parameter that serves to discriminatebetween several handlers used by the same service, if needed.

The handler name may be used both to register the appropriate handlerfor incoming queries or responses, and as a destination for outgoingqueries or responses. In one embodiment, clients of the resolver maydefine two names: one for propagated messages (e.g. queries), and onefor unicast messages (e.g. responses).

In one embodiment, the peer resolver protocol may not allow theregistration of more than one handler with the same name. A service mayregister for any handler name that it uses as a destination, therebypreventing other services from registering themselves to receive thesemessages. In one embodiment, a service or application that receivesqueries or responses from a service instance on another peer is de-factothe local instance of that service and may handle these messages asspecified.

In one embodiment, the peer resolver protocol may not guarantee peersthat define a query handler name will receive that query or mandate thatall peers that define this handler name will receive it. In thisembodiment, the peer resolver protocol may be used to disseminate thequery in a way that maximizes the chance of obtaining a response, if onecan be obtained. In one embodiment, response to a resolver query requestis optional; a peer is not required to respond. In this embodiment, itmay not be guaranteed that a response to a resolver query request willbe made.

In one embodiment, a reliable transport may not be required by the peerresolver protocol, and the peer resolver protocol may not assume thepresence of reliable message delivery. In one embodiment, multipleresolver query messages may be sent. None, one, multiple or redundantresponses may be received.

In one embodiment, the task of propagating a query to the next set ofpeers may be handled by the rendezvous protocol. In one embodiment, arendezvous service may be responsible for determining the set of peersthat should receive a message being propagated, but may notautomatically re-propagate an incoming propagated message. In thisembodiment, the service (query handler) handling the message maydetermine if further propagation is to be performed. In one embodiment,the peer resolver protocol may use the following policy: if the queryhandler does not instruct the peer resolver protocol to discard thequery, and if the local peer is a rendezvous, then the query isre-propagated (within the limits of loop and TTL rules enforced by therendezvous service). In addition, if instructed by the query handler, anidentical query may be issued with the local peer as the originator.

Peer Information Protocol

Once a peer is located, its capabilities and status may be of interest.In one embodiment, the peer-to-peer platform may include a peerinformation protocol that may allow a peer to learn about other peers'capabilities and status. For example, a peer can send a ping message tosee if another peer is alive. A peer may also query another peer'sproperties where each property has a name and a value string. In oneembodiment, a peer may not be required to respond to a peer informationprotocol request.

FIG. 17 illustrates one embodiment of using peer information protocolmessages between a requesting peer 200A and a responding peer 200B. Inone embodiment, to see if peer 200B is alive (i.e. responding tomessages), peer 200A may be sent a ping message 240. The ping message240 may include a destination address that is peer 200B's “main”endpoint returned during discovery, for example. The message may alsoinclude a group membership credential of the requesting peer 200A thatmay identify the probing peer 200A to the message recipient 200B. Themessage may also contain an identifier unique to the sender. In oneembodiment, this identifier may be returned in the response message 242.Response message 242 may include information about peer 200B, includinginformation on the status of the peer 200B. If peer 200B responds with amessage 242, this may indicate to peer 200A that peer 200B is “alive”and thus currently responding to messages.

In one embodiment, messages may be used to get a list of named control“properties” exported by a peer. A property is a “knob” used to getinformation or configuration parameters from the peer. In oneembodiment, all properties may be named (e.g., by a string), and may be“read-only.” In one embodiment, higher-level services may offer“read-write” capability to the same information, given proper securitycredentials. In one embodiment, each property may have a name and avalue string. Read-write widgets may allow the string value to bechanged, while read-only widgets do not. In one embodiment, the peerinformation protocol only gives read access. The destination address isa peer's main endpoint that may have been returned in a discoveryresponse message.

Once a peer is located, its capabilities and status may be queried. Thepeer information protocol provides a set of messages to obtain a peerstatus information. In one embodiment, the peer information protocol isan optional peer-to-peer platform protocol. In one embodiment, peers arenot required to respond to peer information protocol requests.

In one embodiment, the peer information protocol may be layered upon thepeer resolver protocol. In one embodiment, a <QueryID> message elementmay be used to match peer information protocol queries containing<request> elements to the peer information protocol response messagescontaining the matching responses.

In one embodiment, the peer information protocol query message mayinclude a request field that may be used to encode a specific request.In one embodiment, the peer information protocol does not dictate theformat of the request field and it is left up to the consumer to do so.Higher-level services may utilize the request field to offer expandedcapabilities.

In one embodiment, a reliable transport is not required by the peerinformation protocol. In one embodiment, multiple peer informationmessages may be sent. None, one or multiple responses may be received.

In one embodiment, a peer information protocol query message may be sentto a peer to query the current state of the peer, and to optionallyobtain other relevant information about the peer. In one embodiment, apeer information protocol query message without a defined request fieldmay expect in return a default set of information about a peer (i.e.uptime, message count, etc.). In one embodiment, a peer informationprotocol query message may include a source peer identifier messageelement that indicates the peer identifier of the requesting peer. Inone embodiment, a peer information protocol query message may include atarget peer identifier message element that indicates the peeridentifier of the peer being queried. In one embodiment, a peerinformation protocol query message may include a request element. In oneembodiment, the request element may be optional.

In one embodiment, a peer information protocol response message mayinclude specific information about the current state of a peer, such asuptime, inbound and outbound message count, time last message received,and time last message sent. In one embodiment, a peer informationprotocol response message may include a source peer identifier messageelement that indicates the peer identifier of the requesting peer. Inone embodiment, a peer information protocol response message may includea target peer identifier message element that indicates the peeridentifier of the peer being queried. In one embodiment, a peerinformation protocol response message may include an uptime element thatmay indicate the relative time (e.g. in milliseconds) since theresponding peer information service began execution. In one embodiment,peers may include this element in all peer information protocolresponses. In one embodiment, peers may choose to not include thiselement if the information is unavailable or would represent a securitybreach. In one embodiment, a peer information protocol response messagemay include a timestamp element that indicates the absolute time atwhich this response was generated. In one embodiment, peers may includethis element in all peer information protocol responses. In oneembodiment, peers may choose to not include this element if theinformation is unavailable or would represent a security breach. In oneembodiment, a peer information protocol response message may include aresponse element that may include a response to a previous request froma peer information protocol query message. In one embodiment, to matchqueries to responses, a query identifier element of the peer resolverProtocol must match. This field may include any desired content. In oneembodiment, a peer information protocol response message may include atraffic element that may include information about the network trafficperformed by the target peer. In one embodiment, this element isoptional.

In one embodiment, a ping message may be sent to a peer to check if thepeer is alive and/or to get information about the peer. The ping optionmay define the response type returned. In one embodiment, a fullresponse (peer advertisement) or a simple acknowledge response (aliveand uptime) may be returned. The following is an example of oneembodiment of a ping message in XML, and is not intended to be limiting:

<Ping> <Credential> Credential </Credential> <SourcePid> Source Peeridentifier </SourcePid> <TargetPid> Target Peer identifier </TargetPid><Option> type of ping requested</Option> </Ping>

In one embodiment, a peer information response message may be used tosend a response message in response to a ping message. The following isan example of one embodiment of a peer information response message inXML, and is not intended to be limiting:

<PeerInfo> <Credential> Credential </Credential> <SourcePid> Source Peeridentifier </SourcePid> <TargetPid> Target Peer identifier </TargetPid><Uptime> uptime</Uptime> <TimeStamp> timestamp </TimeStamp> <PeerAdv>Peer Advertisement </PeerAdv> </PeerInfo>Peer Membership Protocol

In one embodiment, the peer-to-peer platform may include a peermembership protocol that may allow a peer to join or leave peer groups,and to manage membership configurations, rights and responsibilities.This protocol may allow a peer to obtain group membership requirements(such as an understanding of the necessary credential for a successfulapplication to join the group), to apply for membership and receive amembership credential along with a fill group advertisement, to updatean existing membership or application credential, and to cancel amembership or an application credential. In one embodiment,authenticators and/or security credentials may be used to provide thedesired level of protection.

In one embodiment, the process of joining a peer group may includeobtaining a credential that is used to become a group member. In oneembodiment, the process of joining a peer group may include obtaining a“form” listing the set of requirements asked of all group members. Inone embodiment, this form may be a structured document (e.g. a peergroup advertisement) that lists the peer group membership service.

In one embodiment, the peer membership protocol may define messagesincluding, but not limited to, an apply message, a join message, anacknowledgement (ACK) message, a renew message, and a cancel message. Apeer membership protocol apply message may be sent by a potential newgroup member to the group membership application authenticator. In oneembodiment, the authenticator's endpoint may be listed in the peer groupadvertisement of every member. In one embodiment, a successful responsefrom the group's authenticator may include an application credential anda group advertisement that may list, at a minimum, the group'smembership service. In one embodiment, the apply message may include,but is not limited to, the current credential of the candidate groupmember and the peer endpoint for the peer group membership authenticatorto respond to with an acknowledgement (ACK) message.

The following is an example of one embodiment of a peer membershipprotocol apply message in XML, and is not intended to be limiting:

<MembershipApply> <Credential> Credential of requestor </Credential><SourcePid> Source pipe identifier </SourcePid> <Authenticator>Authenticator pipe advertisement </Authenticator></MembershipApply>

A peer membership protocol join message may be sent by a peer to thepeer group membership authenticator to join a group. In one embodiment,the peer may pass an application credential (from an apply response ACKmessage) for authentication purposes. In one embodiment, a successfulresponse from the group's authenticator may include a full membershipcredential and a full group advertisement that lists, at a minimum, thegroup's membership configurations requested of full members in goodstanding. The message may include a credential (application credentialof the applying peer: see ACK message). This credential may be used asthe application form when joining. The message may also include the peerendpoint for the authenticator to respond to with an ACK message.

The following is an example of one embodiment of a peer membershipprotocol join message in XML, and is not intended to be limiting:

<MembershipJoin> <Credential> Credential of requestor </Credential><SourcePid> Source pipe identifier </SourcePid> <Membersship> membershippipe advertisement </Membership> <Identity> identity</Identity></MembershipJoin>

A peer membership protocol ACK message is an acknowledge message thatmay be used for both join and apply operations. A peer membershipprotocol ACK message may be sent back by the membership authenticator toindicate whether or nor the peer was granted application rights to thepeer group if the peer is applying, or full membership to the peer groupif peer is attempting to join. In one embodiment, an ACK message mayalso be sent in response to peer membership protocol renew messages andcancel messages. The message may include a credential (an application ormembership credential allocated to the peer by the peer groupauthenticator). The message may also include a more complete peer groupadvertisement that may provide access to further configurations. In oneembodiment, not all configuration protocols are visible until the peerhas been granted membership or application rights. Some configurationsmay need to be protected. Also, depending on the peer credential, thepeer may not have access to all the configurations.

The following is an example of one embodiment of a peer membershipprotocol ack message in XML, and is not intended to be limiting:

<MembershipAck> <Credential> Credential </Credential> <SourcePid> Sourcepipe identifier </SourcePid> <Membersship> membership pipe advertisement</Membership> <Peer groupAdv> peer group advertisement </Peer groupAdv><Peer groupCredential> credential granted </Peer groupCredential></MembershipAck>

A peer membership protocol renew message may be sent by a peer to renewits credential (membership or application) access to the peer group. AnACK (acknowledgement) message may be returned with a new credential andlease if the new is accepted. The renew message may include, but is notlimited to, a credential (a membership or application credential of thepeer) and the peer endpoint to which an ACK response message may besent.

The following is an example of one embodiment of a peer membershipprotocol renew message in XML, and is not intended to be limiting:

<MembershipRenew> <Credential> Credential </Credential> <SourcePid>Source pipe identifier </SourcePid> <Membersship> membership pipeadvertisement </Membership> </MembershipRenew>

A peer membership protocol cancel message may be sent by a peer tocancel the peer's membership or application rights in a peer group. Themessage may include, but is not limited to, a credential (a membershipor application credential of the peer) and the peer endpoint to send anACK message. In one embodiment, an ACK to a cancel may include aresponse status indicating the cancel was accepted.

The following is an example of one embodiment of a peer membershipprotocol cancel message in XML, and is not intended to be limiting:

<MembershipCancel> <Credential> Credential </Credential> <SourcePid>Source pipe identifier </SourcePid> <Membersship> membership pipeadvertisement </Membership> </MembershipCancel>Pipe Binding Protocol

In one embodiment, the peer-to-peer platform may include a pipe bindingprotocol that may allow a peer to find the physical location of a pipeendpoint and to bind a pipe advertisement to the pipe endpoint, thusindicating where messages actually go over the pipe. A pipe isconceptually a virtual channel between two pipe endpoints (input andoutput pipes) and may serve as a virtual link between two or more peersoftware components (e.g. services or applications).

A pipe may be viewed as an abstract, named message queue that supports anumber of abstract operations such as create, open, close, delete, send,and receive. The pipe virtual link (pathway) may be layered upon anynumber of physical network transport links such as TCP/IP, HTTP, andTLS. In one embodiment, the pipe binding protocol is layered upon theendpoint protocol that allows it to use a variety of transportprotocols, such as HTTP Transport, TCP/IP Transport, or a secure TLSTransport. Each end of the pipe may work to maintain the virtual linkand to reestablish it, if necessary, by binding endpoints or finding thepipe's currently bound endpoints.

Actual pipe implementations may differ, but in one embodiment,peer-to-peer platform-compliant implementations may use the pipe bindingprotocol to bind pipes to pipe endpoints. In one embodiment, during theabstract create operation, a local peer binds a pipe endpoint to a pipetransport. In another embodiment, bind may occur during the openoperation. Unbind occurs during the close operation. In one embodiment,each peer that “opens” a group pipe may make an endpoint available(binds) to the pipe's transport. In one embodiment, messages may be sentonly to the one or more endpoints bound to the pipe. Peers that have notopened the pipe may not receive or send any messages on that pipe. Inone embodiment, when some peer software wants to accept incoming pipemessages, the receive operation may remove a single message in the orderit was received, not in the order it was sent. In one embodiment, a peekoperation may be used as a mechanism to see if any message(s) hasarrived in the pipe's queue.

In one embodiment, the pipe binding protocol may define messagesincluding, but not limited to, a query message and a response message.In one embodiment, a pipe binding protocol query message may be sent bya peer pipe endpoint to find a pipe endpoint bound to the same pipeadvertisement. The following is an example of one embodiment of a pipebinding protocol query message in XML, and is not intended to belimiting:

<PipeBindingQuery> <Credential> query credential </Credential> <Peer>optional tag. If present, it may include the peer identifier of the onlypeer that should answer the request. </Peer> <Cached> true if the replycan come from a cache </Cached> <PipeId> pipe identifier to be resolved</PipeId> </PipeBindingQuery>

In one embodiment, the requestor may ask that the information not beobtained from a cache. This is to obtain the most up-to-date informationfrom a peer to address stale connection. The Peer field specifies a peeridentifier. This peer is the one that should respond to the query. Inone embodiment, there may be no guarantee that a response to a pipebinding request will be made. In one embodiment, a peer is not requiredto respond to a binding request. In one embodiment, a reliable transportis not required. In one embodiment, multiple binding query messages maybe sent. None, one or multiple responses may be received.

In one embodiment, a pipe binding protocol response message may be sentto the requesting peer by each peer bound to the pipe in response to aquery message. The following is an example of one embodiment of a pipebinding protocol response message in XML, and is not intended to belimiting:

<PipeBindingAnswer> <Credential> credential </Credential> <PipeId> pipeidentifier resolved </PipeId> <Peer> peer URI where a correspondingInputPipe has been created </Peer> <Found> true: the InputPipe doesexist on the specified peer (ACK) false: the InputPipe does not exist onthe specified peer (NACK) </Found> </PipeBindingAnswer>Endpoint Routing Protocol

In one embodiment, the peer-to-peer platform may include an endpointrouting protocol. The endpoint routing protocol may be used by peers tosend messages to router peers requesting available routes for sendingmessage(s) to destination peers. In one embodiment, this may beaccomplished through message exchanges between peer routers. Peerrouting may be necessary to enable two peers to communicate depending ontheir location in the network. For instance, the two peers may be ondifferent transports; the peers may be separated by a firewall; or thepeers may be using incompatible private IP address spaces. Whennecessary, one or more peer routers may be used to deliver a messagefrom the originating peer endpoint to the destination peer endpoint.

A peer-to-peer platform network is typically an ad hoc, multi-hops, andadaptive network by nature. Connections in the network may be transient,and message routing may be nondeterministic. Routes may beunidirectional and change rapidly. Peers may appear and leavefrequently. Two communicating peers may not be directly connected toeach other. Two communicating peers may need to use router peers toroute messages depending on the network topology. For example, the twopeers may be on different network transports, or the peers may beseparated by a firewall or a NAT (Network Address Translation) router. Apeer behind a firewall may send a message directly to a peer outside afirewall. But a peer outside the firewall cannot establish a connectiondirectly with a peer behind the firewall.

The endpoint routing protocol may define a set of request/query messagesthat is processed by a routing service to help a peer route messages toits destination. When a peer is asked to send a message to a given peerendpoint address, it may look in its local cache to determine if it hasa cached route to this peer. If the peer does not find a route, it maysend a route resolver query message to available peer routers requestingroute information. A peer may have access to as many peer routers as itcan find, or optionally a peer may be pre-configured to access certainrouters.

Peer routers may provide the low-level infrastructures to route amessage between two peers in the network. Any number of peers in a peergroup may elect themselves to become peer routers for other peers. Peersrouters offer the ability to cache route information, as well asbridging different physical (different transport) or logical (firewalland NAT) networks. A peer may dynamically find a router peer via aqualified discovery search. A peer may find out if a peer it hasdiscovered is a peer router via the peer advertisement, for example by aproperties tag and/or by a parameters element.

When a peer router receives a route query, if it knows the destination(a route to the destination), it may answer the query by returning theroute information as an enumeration of hops. The message may be sent tothe first router and that router may use the route information to routethe message to the destination peer. The route may be ordered from thenext hop to the final destination peer. At any point, the routinginformation may become obsolete, requiring the current router to find anew route in order to complete the message delivery.

The peer endpoint may add extra routing information to the messages sentby a peer. When a message goes through a peer, the endpoint of that peermay leave its trace on the message. The trace may be used for loopdetection and to discard recurrent messages. The trace may also be usedto record new route information by peer routers.

In one embodiment, the endpoint routing protocol may provide last resortrouting for a peer. More intelligent routing may be implemented by moresophisticated routing services in place of the core routing service.High-level routing services may manage and optimize routes moreefficiently than the core service. In one embodiment, the hooksnecessary for user defined routing services to manipulate and update theroute table information (route advertisements) used by the peer routermay be provided by the endpoint routing protocol. Thus, in oneembodiment, the complex route analysis and discovery may be performedabove the core by high-level routing services, and those routingservices may provide intelligent hints to the peer router to routemessages.

Router peers may cache route information. Router peers may respond toqueries with available route information. Route information may includea list of gateways along the route. In one embodiment, any peer maybecome a router peer by implementing the endpoint routing protocol. Thefollowing is an example of one embodiment of route information in XML,and is not intended to be limiting:

<endpoint router > <Credential> credential </Credential> <Src> peeridentifier of the source </Src> <Dest> peer identifier of thedestination </Dest> <TTL> time to live </TTL> <Gateway> ordered sequenceof gateway </Gateway> ................... <Gateway> ordered sequence ofgateway </Gateway> </endpoint router >

The time-to-live parameter specifies how long this route is valid. Inone embodiment, the time-to-live indicator may be measured in hops. Thecreator of the route can decide how long this route will be valid. Thegateways may be defined as an ordered sequence of peer identifiers thatdefine the route from the source peer to the destination peer. Thesequence may not be complete, but in one embodiment, at least the firstgateway is present. The first gateway is sufficient to initially routethe messages. In one embodiment, the remaining gateway sequence may beoptional.

The endpoint routing protocol may provide messages including, but notlimited to, a route request message and a route answer message from therouter peer. In one embodiment, a peer may send a route request messageto a router peer to request route information. Route information may becached or not cached. In some cases, the route query request message mayindicate to bypass the cache content and thus to search dynamically fora route. In one embodiment, it may not be guaranteed that a routeresponse will be received after a query is sent. The following is anexample of one embodiment of a route query request message in XML, andis not intended to be limiting:

<endpoint router Query> <Credential> credential </Credential> <Dest>peer identifier of the destination </Dest> <Cached> true: if the replycan be a cached reply false: if the reply must not come from a cache</Cached> </endpoint router Query>

In one embodiment, a router peer may send a route answer message to apeer in response to a route information request. The following is anexample of one embodiment of a route answer message in XML, and is notintended to be limiting:

<endpoint router Answer> <Credential> credential </Credential> <Dest>peer identifier of the destination </Dest> <RoutingPeer> Peer identifierof the router that knows a route to DestPeer </RoutingPeer><RoutingPeerAdv> Advertisement of the routing peer </RoutingPeerAdv><Gateway> ordered sequence of gateways </Gateway> ...................<Gateway> ordered sequence of gateways </Gateway> </endpoint routerAnswer>

In one embodiment, the gateway(s) may be represented by peer-to-peerplatform identifiers.

Endpoint Service

One embodiment may include an endpoint service that may be responsiblefor performing end-to-end messaging between two peers, using one of theunderlying peer-to-peer platform transport protocols, such as TCP orHTTP bindings. The endpoint service may be used by other services orapplications that need to have an understanding of the network topology,such as a resolver service or a propagation service. In one embodiment,the endpoint service is not responsible for routing messages for peersthat are not directly connected to each other. This task is performed bythe endpoint router transport protocol that may provide the illusionthat the source and destination peers are directly connected.

In one embodiment, when the endpoint service transmits a message it mayadd the source peer identifier as an element to the message. In oneembodiment, the element is a representation of the peer identifier atthe point of emission of the message. In one embodiment, thisinformation is optional and may be used by the emitter endpoint serviceto detect and eliminate propagated messages that loop back to theemitter. If this element is not present, the message may be assumed tonot be looping back.

The endpoint service may expect incoming and outgoing messages to have asource address and a destination address. The encapsulation of thatinformation is specified by the message wire format being used. In oneembodiment, the source and destination addresses of a message may berepresented as strings in URI format.

In one embodiment, the endpoint service may delegate the sending ofoutgoing messages to the endpoint protocol designated by a “protocol”part of the message's destination address. In one embodiment, theendpoint service may deliver incoming messages to the listenerregistered under the name that matches a concatenation of “unique nameof recipient” and “unique name in recipient context” portions of themessage's destination address.

Endpoint Router Transport Protocol

One embodiment may include an endpoint router transport protocol that isa logical peer-to-peer platform transport protocol at a level “below”the endpoint service and with one or more other transport protocols suchas TCP and HTTP Transport Protocols. The endpoint router may beresponsible for exchanging messages between peers that do not have adirect connection between each other. The endpoint router may provide avirtual direct connection to the peer's endpoint service.

In one embodiment, the endpoint router transport protocol defines a setof query and response messages that may be used to communicate withinstances of the endpoint router on other peers. In one embodiment, themessages may be sent and received by the endpoint router using aresolver service. These messages may include one or more of, but are notlimited to:

-   -   Route query: when the endpoint router is requested to send a        message to a peer for which it does not have yet a route for,        the endpoint router may send a route query request to other        peers. One or more peers that have a route for the given peer        may answer with route responses.    -   Route response: a peer that desires to inform another peer about        a give route may send a route response to the other peer. A        route response may be a reply to a route query.    -   Ping query: a ping query may be sent to a peer in order to        validate a route. A peer receiving a ping query is requested to        answer with a ping response.    -   Ping response: a ping response may be sent to an originator of a        ping query.

In one embodiment, the endpoint router may define an informationalmessage that requires no reply. This message may be sent by any peerthat detects that a route used by another peer is not valid. Forexample, a router peer that is requested to route a message to a peerfor which it does not have a route may send an informational message. Inone embodiment, the informational message is optional: routers are notrequired to send them. While an informational message is typically sentto the source peer of a message, peers may send informational messagesto other peers of their choice.

In one embodiment, the endpoint router transport protocol may append amessage element to each message it transports. In one embodiment, theelement may be a markup language (e.g. XML) document. In one embodiment,the element may include one or more of, but is not limited to, thefollowing:

-   -   Source: the original endpoint address of the source of the        message. In one embodiment, this may be required.    -   Destination: the original endpoint address of the destination of        the message. In one embodiment, this may be required.    -   Last Hop: The endpoint router endpoint address of the last        router that processed the incoming message to route. In one        embodiment, this may be required.    -   Number of hops: the number of the peers the incoming message to        route has already been through. In one embodiment, this may be        required.    -   Forward Route: a list of one or more endpoint router endpoint        addresses of the peers the message is supposed to go through in        order to reach its destination. In one embodiment, this list is        optional since each router may use a query route request in        order to find a route. This list may be used to preferably        decrease the network traffic by limiting the use of queries,        which may be expensive.    -   Reverse Route: a list of one or more endpoint router endpoint        addresses of the peers the message is supposed to go through in        order to reach its source. In one embodiment, this list is        optional since each router may use the query route request in        order to find a route. This list may be used to preferably        decrease the network traffic by limiting the use of queries,        which may be expensive.

In one embodiment, queries and responses defined by the endpoint routertransport protocol may be sent using a resolver service. In oneembodiment, the messages may be represented by a markup language (e.g.XML) document (passed to and by the resolver service). In oneembodiment, endpoint router transport protocol messages may include oneor more of, but is not limited to, version information, type information(e.g. route query, route response, ping query, ping response, orinformational message), destination peer (e.g. endpoint router endpointaddress), routing peer (e.g. endpoint router endpoint address), routingpeer advertisement, number of hops, and gateway forward (e.g. endpointrouter endpoint address).

In one embodiment, depending on the type of the message, only a subsetof the above may be used. For a route query, destination peer mayinclude the peer identifier (in its endpoint router definition) of thepeer for which a route is requested. For a route response, destinationpeer may include the peer identifier (in its endpoint router definition)of the peer for which a route was requested. Routing peer may includethe endpoint address of the peer that knows how to route message to thedestination peer. Routing peer advertisement may optionally include thepeer advertisement of the routing peer, which if included may allow therequesting peer to not have to search for the advertisement later on.Number of hops may indicate the number of hops of the route starting atthe routing peer. Gateway forward may include the endpoint address(es)of routing peer(s) within the route. In one embodiment, gateway forwardis a list of that may define the entire route to be used starting at therouting peer in order to reach the destination. In one embodiment,endpoint routers are not required to fill up this list; however, fillingthe list may be desired if the endpoint router desires to use theoptimization of embedding the forward route within the message.

For a ping query, destination peer may include the peer identifier (inits endpoint router definition) of the peer for which a ping isrequested. For a ping response, destination peer may include the peeridentifier (in its endpoint router definition) of the peer for which aping was requested. For an informational message, destination peer mayinclude the peer identifier (in its endpoint router definition) of thepeer for which the route has failed. If a message for which a route hasfailed includes a list in gateway forward, this list may be included inthe informational message.

In one embodiment, the endpoint router transport protocol may append anendpoint router message element to messages it transports. In oneembodiment, the element may be a markup language (e.g. XML) document. Inone embodiment, the element may include one or more of, but is notlimited to, a source, a destination, a last peer, a number of hops, agateway forward, and a gateway reverse. The source may include theendpoint address of the original source of the message. The destinationmay include the address of the original destination of the message. Thelast peer may indicate the address of an immediately previous peer thathas received the message. The number of hops may indicate the number ofhops of the reverse route (0 if there is no reverse route.) The gatewayforward may include the endpoint address(es) of one or more routingpeers within the forward route. In one embodiment, gateway forward maybe a list that defines the route to be used in order to reach thedestination peer of the message. In one embodiment, endpoint routers maynot be required to fill up this list; however, doing so may decreaselatency of communication between peers. Gateway reverse may include theendpoint address(es) of one or more routing peers within the reverseroute. In one embodiment, gateway forward may be a list that defines theroute to be used in order to reach the source peer of the message. Inone embodiment, endpoint routers may not be required to fill up thislist; however, doing so may decrease latency of communication betweenpeers.

In one embodiment, the endpoint router transport protocol may have itsown endpoint address format. The following is an exemplary endpointaddress format for the endpoint router transport protocol and is notintended to be limiting:

-   -   xxxx://uuid-<PeerID unique value>        Routing

In one embodiment, the peer-to-peer platform may provide a mechanism ormechanisms for searching and accessing peers, peer groups, content,services and other information in a dynamic topology of peers and peergroups, where peers and peer groups can come and go. In one embodiment,peers and peer groups may come and go potentially with limited or nocontrol and notification. Peers may connect to a peer-to-peer networkthrough various wired and wireless protocols, including “not connected”protocols such as may be used by mobile consumer devices such as pagersand PDAs. Peers may also have to cross boundaries, for exampleboundaries created by firewalls and NAT (Network Address Translation)routers, to connect to other peers.

In one embodiment, an application that supports the peer-to-peerplatform may help in routing and discovering. Some of the informationneeded to accomplish routing and discovering may be only known by theapplication. For example, the application may support a special type ofdata as content, and so the application may best “know” how to discoveritems of this special content. Also, the application may have a betterknowledge of the topology (related to the nature of the applicationand/or peer group) than the core peer-to-peer platform.

In one embodiment, in order to bootstrap the system, and also in orderto have a fallback mechanism if an application cannot or does notsupport one or more of the tasks, the core peer-to-peer protocols mayprovide a discovery and router mechanism for discovering peers and othercore abstractions such as advertisements, pipes, and peer groups. In oneembodiment, the discovery and routing mechanism of the peer-to-peerplatform may use as few protocols as possible, is simple, and makes useof underlying optimizations when available. Hooks into the corediscovery and router mechanism may be provided so that applications andservices may participate in the discovery and router mechanisms, forexample, by passing information to the core discovery and routermechanism. In one embodiment, an application or service may be allowedto override the core discovery and router mechanism with its own custommechanism.

In one embodiment, the core discovery and router mechanism may be basedon web crawling. Web crawling may be well suited for use inself-organizing networks such as peer-to-peer networks. In oneembodiment, peers may be configured to participate or not to participatein the discovery and router mechanism, and may be configured as to thelevel of involvement in the process In one embodiment, a peer may decidewhether to participate in a discovery or routing task depending on thepeer's configuration in the peer-to-peer network. In one embodiment, theconfiguration may be determined using an automated detection of theposition of the peer on the network and a network configuration wizardtool.

Web crawling may not create bottlenecks such as may be created by themechanism of a client knowing a server and always going to the sameserver to find and retrieve information (e.g. DNS, NFS etc.). Even if aserver is replicated, like DNS, it is still a centralized server. If allthe known instances of the server are not reachable, a client may loseaccess to the server, even if another (but unknown) server is, indeed,available. In a point-to-point network, the information a peer islooking for is generally “close by” or may eventually be “close by”, soweb crawling may not go too far.

FIG. 18 illustrates several core components and how they interact fordiscovery and routing according to one embodiment. Application 300 mayuse discovery 308 to find peers, peer groups, advertisements, and otherentities on the peer-to-peer network, and may also publish pipe, peer,peer group, service, and other advertisements for access by other peers,applications and services on the peer-to-peer network. In oneembodiment, the endpoint 310 may be responsible for exchanging messagesbetween peers that are directly “connected” to each other (i.e. thepeers can reach each other without any routing and/or discovering). Whenavailable, multicast may be used to discover peers that the endpoint canreach (multicast is a mechanism which has been introduced in IP in orderto optimize this kind of process). In addition to that, or whenmulticast is not available, A rendezvous and invitation mechanism mayalso be provided. The rendezvous and invitation method may be used, forexample, if multicast is not available. For example, HTTP does notprovide multicast capabilities.

The endpoint router 312 may manage a cache of routes, for example routesto remote peers. In one embodiment, the endpoint router 312 may beconfigured from caching no routes to caching all routes it is aware of,depending on what the configuration wizard has decided with usercontrol. The endpoint router 312 may also forward (route) messagesdepending on what is found in the cache, and what has been configured.For instance, the endpoint router 312 may be configured to route search(propagate) requests or to not route the requests.

In one embodiment, the generic resolver 308 is a protocol thatimplements a sort of RPC (query/response) protocol on top of theendpoint 310. Discovery 306 and pipe resolver 304 may use the genericresolver. In one embodiment, discovery 306 may be responsible forsearching, caching and generating core advertisements (e.g. peer, peergroup, and pipe advertisements). Discovery 306 may use the genericresolver 308 to send query messages and to receive answers. In oneembodiment, discovery 306 may be aware of rendezvous peers and may havean invitation mechanism that may be used to assist the generic resolver308. In one embodiment, the pipe resolver 304 may be responsible forlocalizing the receiving end of a pipe 302 given a pipe advertisement.In one embodiment, the pipe resolver 304 does not search for a pipeadvertisement. In one embodiment, the pipe resolver 304 may beconfigured to manage a cache of the locations of the receiving ends(i.e. receiving peers) of the pipe 302.

The pipe protocol may use the endpoint 310 for transferring messages(with the potential help of the endpoint router 312) between the sendingend of the pipe 302, and the receiving end of the pipe 302. In oneembodiment, a pipe 302 may be viewed as an endpoint 310 that has notbeen bound to a particular peer. In one embodiment, a pipe 302 may bemoved seamlessly from one peer to another. In one embodiment, a pipe 302may also provides uniqueness that may not be provided by an endpoint 310since a pipe identifier is unique in time and space, and an endpoint310, being a network address, may not be.

A discovery and router mechanism based on web crawling may betime-expensive, and higher level protocols (such as applications) mayhave information that the core is not aware of that may help in the webcrawling process. In one embodiment, to enable applications toparticipate in the process, components of the core mechanism may providehooks that enable the applications to assist in the process (e.g. byproviding information). Some transport protocols such as HTTP may beconfigured for and/or dynamically learn about web rendezvous peers itcan use. An application may be provided access to the list of rendezvouspeers. In one embodiment, an application may be allowed to set/unsetroutes in an endpoint router 312. Each route may be qualified to routeor not route propagate messages such as web crawling messages and/orunicast messages. The endpoint router 312 may be viewed as a route cachemanager, which is may be controlled by an endpoint 310 and/or otherentities that may need to control it. In one embodiment, an endpointrouter 312 may be able to discover unknown routes from applications. Inone embodiment, discovery 308 may be configured (statically and/ordynamically) to control the nature and the amount of data that itmanages. In one embodiment, discovery 308 may be taught where to gosearch, or where not to go search. In one embodiment, discovery 308 maymake an “upcall” to a search/retrieve mechanism. In one embodiment, apipe resolver 304 may manage a cache of input pipes (receiving ends). Inone embodiment, pipe resolver 304 may be accessed by applications toset/unset entries in the cache.

Router Peers

FIG. 19 illustrates one embodiment of message routing in a peer-to-peernetwork that uses the peer-to-peer platform. Peers 200 in peer groups210A and 210B may communicate with each other through one or more routerpeers 244. In one embodiment, message routing may route messages to“unreachable” peers, i.e. may allow messages sent from a peer 200 toreach peers 200 that are otherwise unreachable. Networks may bepartitioned by firewalls, NAT (Network Address Translation) routers,etc. Message routing may allow messages to be delivered in partitionednetworks. Message routing may also allow peers 200 separated by one ormore partitions to participate in the same peer group(s) 210. Messagerouting may provide optimized message delivery, for example byoptimizing routes between peers 200. Message routing may allow for anadaptive peer-to-peer network (e.g. peers may move to remote locationsand still receive messages). Message routing may provide load balancing.In one embodiment, any peer may be a router peer 244.

One embodiment may provide for HTTP routing servers. In one embodiment,HTTP routers may provide for message routes that traverse firewalls. Inone embodiment, HTTP routers may provide NAT support. In one embodiment,HTTP routers may act as message gateways (TTL). TTL stands for Time ToLive (how long the request lives in the system).

The widespread use of NAT (Network Address Translation) and firewallsmay affect the operation of many peer-to-peer systems. It also mayaffect the peer-to-peer platform. In particular, a peer outside afirewall or a NAT gateway cannot discover peers inside the firewall orthe NAT gateway. In the absence of getting system administrators to letthe peer-to-peer platform traffic through (say by opening a specialincoming port at the firewall or gateway), possible methods to deal withthis problem include, but are not limited to:

-   -   In one embodiment, peers inside firewalls may be asked to        initiate connections to peers outside the firewall.    -   In one embodiment, peer nodes may be set up that operate like        mailbox offices where traffic to a peer inside the firewall is        queued up to be picked up at a designated relay peer outside the        firewall. The peer inside the firewall can initially reach        outside the firewall, select a relay peer, and widely advertise        this fact. Later, it can periodically contact the relay peer to        retrieve messages.

One embodiment of the peer-to-peer platform may provide router peers.The router peers may be at a lower level than rendezvous peers. Therouter peers may provide “pure” message routing. By looking at thedestination and source addresses, the router peer may determine where amessage needs to be sent. In one embodiment, a router peer may call oraccess a rendezvous peer to “discover” information about peers, etc. Inother words, the router peer may access information from a rendezvouspeer to use the information in routing messages.

In one embodiment, router peers may provide the lowest message routinglayer in the peer-to-peer platform. Routing may involve complextopologies. For example, the routing peers may provide a method to routeacross a firewall, particularly from peers outside the firewall to peersinside the firewall. A peer cannot send a message directly to anotherpeer behind a firewall, since by definition there may be no direct routefrom a peer outside the firewall to a peer inside the firewall. A routerpeer may route messages to a gateway peer (a mailbox server wheremessages for peers behind the firewall may be temporarily stored). Inone embodiment, the gateway peer may be a router peer acting as agateway. The peers behind the firewall may periodically poll themailboxes provided by the gateway peer to determine if someone has triedto contact them (i.e. are there any messages in my mailbox?). Note thata “pipe” provides an abstraction at a higher level than the messagerouting provided by router peers, and thus, a pipe may be an abstractionacross the network topology between peers, for example peers on oppositesides of a firewall, through which the peers may communicate. At thelowest level, one or more router peers may discover and establish theactual communications route between the peers. This level, however, maybe transparent to the peers, who only “see” the pipes.

In one embodiment, a router peer may build a route table. The routerpeer may keep information about routes that it discovers and store themin the route table. This allows the router peer to build a knowledgebase (the route table) about the network topology as more messages flowon the system. This information may be used by the router peer todiscover and establish optimal routes between entities in the network,and may increase its ability to reach other peers.

A router peer may access another router peer it is aware of to get routeinformation. The route information may be described as a stacked set ofdestinations (and the routes to the destinations). In one embodiment,the information the router peer stores on a particular route may beincomplete, because the router peer may only know about the route up toa certain point. For example, the router peer may know about a firstportion of a route up to another router peer, which knows about the nextportion of the route, and so on.

In one embodiment, each peer has a unique peer identifier that isindependent of, and is not assigned to, fixed addresses. Peers may movearound. Therefore, the peer-to-peer network topology may be dynamic, andmay change every time a peer goes away or moves. Thus, in oneembodiment, the routing method provided by the router peers may bedynamic to support the dynamic topology. When a peer moves andreconnects, the peer is recognized as the same peer that was previouslyconnected elsewhere in the network. This process may use the uniqueidentifier of the peer to indicate that the peer is the same one thatwas previously connected elsewhere. In one example, when a peer moves,it may go through a discovery process to discover peers and rendezvouspeers in its new local subnet or region. If the peer wishes to join apeer group that it used at its previous location, it may then attempt todiscover other peers that have knowledge of the peer group or otherpeers in the peer group. The message may be passed through severalrouter peers until it may reach a router peer that has knowledge aboutthe peer group (e.g. a route to the peer group) to return to therequesting peer. For example, a user with a laptop may fly from a homeoffice to another city. When the user connects to the network in theother city, a route may be established, through the services provided byrouter peers, to the home office network peer group. The user may thenaccess email and other services provided by the peer group. From theuser's standpoint, this process may seem automatic. For example, theuser may not be required to “dial in” or connect remotely to an ISP toaccess the office as is required in typical networks using staticaddressing.

In one embodiment, when a peer becomes a router peer, it may access astored route table as a starting point. In one embodiment, the peer maystart from scratch with an empty route table. In one embodiment, thepeer, when it becomes a router peer, may initiate a discovery of otherrouter peers and/or rendezvous peers to get as much connectivityinformation to key peers in the network as possible.

In one embodiment, every peer may have knowledge of at least one routerpeer. In one embodiment, there may be a “universal router” that many orall peers may be aware of that may be accessed when a peer cannot findanyone. The universal router may be able to put the peer into contactwith somebody (e.g. another peer) to help in the bootstrapping process.

Security

The security requirements of a peer-to-peer system may be similar to anyother computer system. The three dominant requirements areconfidentiality, integrity, and availability. These translate intospecific functionality requirements that include authentication, accesscontrol, audit, encryption, secure communication, and non-repudiation.Such requirements are usually satisfied with a suitable security modelor architecture, which is commonly expressed in terms of subjects,objects, and actions that subjects can perform on objects. For example,UNIX has a simple security model. Users are subjects. Files are objects.Whether a subject can read, write, or execute an object depends onwhether the subject has permission as expressed by the permissions modespecified for the object. However, at lower levels within the system,the security model is expressed with integers, in terms of UID, GID, andthe permission mode. Here, the low-level system mechanisms do not (needto) understand the concept of a user and do not (need to) be involved inhow a user is authenticated and what UID and GID they are assigned.

In one embodiment, to support different levels of resource access in adynamic and ad hoc peer-to-peer network, the peer-to-peer platform mayprovide a role-based trust model in which an individual peer may actunder the authority granted to it by another trusted peer to perform aparticular task. Peer relationships may change quickly and the policiesgoverning access control need to be flexible in allowing or denyingaccess. In one embodiment, the trust model may provide securityincluding, but not limited to, confidentiality, authorization, dataintegrity and refutability. Confidentiality guarantees that the contentsof the message are not disclosed to unauthorized individuals.Authorization guarantees that the sender is authorized to send amessage. Data integrity guarantees that a message was not modifiedaccidentally or deliberately in transit. Refutability guarantees amessage was transmitted by a properly identified sender and is not areplay of a previously transmitted message.

In one embodiment, peer-to-peer platform messages are structured toallow peer-to-peer platform services and applications to add arbitrarymetadata information to the messages such as credentials, digests,certificates, public keys, etc. A credential is a token that whenpresented in a message body is used to identify a sender and can be usedto verify that sender's right to send the message to the specifiedendpoint. The credential is an opaque token that must be presented eachtime a message is sent. The sending address placed in the messageenvelope may be cross-checked with the sender's identity in thecredential. Each credential's implementation is specified as a plug-inconfiguration, which allows multiple authentication configurations toco-exist on the same network. Message digests guarantee the dataintegrity of messages. Messages may also be encrypted and signed forconfidentiality and refutability.

In one embodiment, the peer-to-peer platform protocols may be compatiblewith widely accepted transport layer security mechanisms formessage-based architectures such as Transport Layer Security (TLS),Secure Sockets Layer (SSL), and Internet Protocol Security (IPSec).However, secure transport protocols such as TLS, SSL and IPSec may onlyprovide the integrity and confidentiality of message transfer betweentwo communicating peers. In order to provide secure transfer inmulti-hops network, a trust association may be established among all theintermediary peers. Security is compromised if anyone of thecommunication links is not secured. One embodiment of the peer-to-peerplatform may provide a virtualized Transport Layer Security (TLS)implementation that allows secure endpoint-to-endpoint communicationsregardless of the number of hops required to deliver each message.

The peer-to-peer platform security model may be implemented to provide apeer-to-peer web of trust. The web of trust may be used to exchangepublic keys among its members. Each peer group policy may permit somemembers to be trusted to the extent that they have the authority to signpublic keys for other members as well as to do things like authenticate,add new members, and remove or revoke membership.

Embodiments may implement security classes for the RSA public keyexchange, the RC4 byte stream cipher, and the SHA-1 hash algorithm,among others. These classes may enable privacy by the means of apeer-to-peer TLS implementation; integrity with signed hashes;non-repudiation using the web of trust; and MACs for data authenticity.Combinations of these classes may form security suites, and thepeer-to-peer platform provides the mechanism to add new customizedsuites as required.

In some embodiments, for peer group authentication a separate PluggableAuthentication Module (PAM) may be provided. Embodiments may provideanonymous or guest login, and login with user name and password. A loginsession may be in clear or cipher-text as per the peer group securitypolicy.

The security module may be available to the core level, and thusservices, applications and advanced services and applications may plugin their own security components and protocols. For example, the web oftrust may be defined by a policy that requires authorized peer groupmembers to be well-known certificate authorities, and that peersexchange X509v3 CA signed certificates.

Given that the peer-to-peer platform is defined around the concepts ofpeers and peer groups, one embodiment may include a securityarchitecture in which peer identifiers and group identifiers are treatedas low-level subjects (just like UID and GID), codats are treated asobjects (just like files), and actions are those operations on peers,peer groups, and codats.

One or more of several other characteristics of the peer-to-peerplatform may further affect the security requirements of thepeer-to-peer platform. In one embodiment, the peer-to-peer platform maybe focused on mechanisms and not policy. For example, UUIDs are usedthroughout, but they by themselves have no external meaning. Withoutadditional naming and binding services, UUIDs are just numbers that donot correspond to anything like a user or a principal. Therefore, in oneembodiment, the peer-to-peer platform may not define a high-levelsecurity model such as information flow, Bell-LaPadula, or Chinese Wall.In one embodiment, when UUIDs are bound to external names or entities toform security principals, authenticity of the binding may be ensured byplacing in the data field security attributes, for example, digitalsignatures that testify to the trustworthiness of the binding. Once thisbinding is established, authentication of the principal, access controlbased on the principal as well as the prevailing security policy, andother functions such as resource usage accounting may be performed.

In one embodiment, the peer-to-peer platform may be neutral tocryptographic schemes and security algorithms. As such, the peer-to-peerplatform may not mandate any specific security solution. In such cases,a framework may be provided where different security solutions can beplugged in. In one embodiment, hooks and placeholders may be provided sothat different security solutions may be implemented. For example, everymessage may have a designated credential field that may be used to placesecurity-related information. In one embodiment, exactly how tointerpret such information is not defined in the peer-to-peer platform,and may be left to services and applications.

In one embodiment, the peer-to-peer platform may sometimes satisfysecurity requirements at different levels of the system. In oneembodiment, to provide flexibility and avoid redundancy, thepeer-to-peer platform may not force a particular implementation ondevelopers. Instead, enhanced platforms based on the peer-to-peerplatform may provide the appropriate security solutions to theirtargeted deployment environment. To illustrate the last point, twosecurity concerns (communications security and anonymity) are examined.

Peers communicate through pipes. As an example, suppose bothconfidentiality and integrity in the communications channel are desired.In one embodiment, Virtual Private Networks (VPNs) may be used to moveall network traffic. In one embodiment, a secure version of the pipe maybe created, similar to a protected tunnel, such that any messagetransmitted over this pipe is automatically secured. In one embodiment,regular communications mechanisms may be used, and specific datapayloads may be protected with encryption techniques and digitalsignatures. Embodiments of the peer-to-peer platform may accommodate oneor more of these and other possible solutions.

Anonymity does not mean the absence of identity. Indeed, sometimes acertain degree of identification is unavoidable. For example, a cellphone number or a SIM card identification number cannot be keptanonymous, because it is needed by the phone company to authorize andset up calls. As another example, the IP number of a computer cannot behidden from its nearest gateway or router if the computer wants to sendand receive network traffic. In general, anonymity can be built on topof identity, but not vice versa. There may be multiple ways to ensureanonymity. In the examples above, it is difficult to link a prepaid SIMcard sold over the retail counter for cash to the actual cell phoneuser. Likewise, a cooperative gateway or router may help hide thecomputer's true IP address from the outside world by using messagerelays or NAT (Network Address Translation).

In one embodiment, a peer-to-peer platform-based naming service may binda peer to a human user. The user's anonymity may be ensured through thenaming service, or the authentication service, or a proxy service, orany combination of these. In one embodiment, the peer-to-peer platformmay be independent of the solution chosen by a particular application.

At many places, the peer-to-peer platform may be independent of specificsecurity approaches. In one embodiment, the peer-to-peer platform mayprovide a comprehensive set of security primitives to support thesecurity solutions used by various peer-to-peer platform services andapplications. Embodiments of the peer-to-peer platform may provide oneor more security primitives including, but not limited to:

-   -   A simple crypto library supporting hash functions (e.g., MD5),        symmetric encryption algorithms (e.g., RC4), and asymmetric        crypto algorithms (e.g., Diffie-Hellman and RSA).    -   An authentication framework that is modeled after PAM (Pluggable        Authentication Module, first defined for the UNIX platform and        later adopted by the Java security architecture).    -   A simple password-based login scheme that, like other        authentication modules, can be plugged into the PAM framework.    -   A simple access control mechanism based on peer groups, where a        member of a group is automatically granted access to all data        offered by another member for sharing, whereas non-members        cannot access such data.    -   A transport security mechanism that is modeled after SSL/TLS,        with the exception that it is impossible to perform a handshake,        a crypto strength negotiation, or a two-way authentication on a        single pipe, as a pipe is unidirectional.    -   The demonstration services called InstantP2P and CMS (content        management service) also make use of additional security        features provided by the underlying Java platform.

In one embodiment, peers, configurations, peer groups, and pipes formthe backbone of the peer-to-peer platform. Security in some embodimentsof the peer-to-peer platform may use credentials and authenticators(code (e.g. computer-executable instructions) that may be used toreceive messages that either request a new credential or request that anexisting credential be validated). A credential is a token that whenpresented in a message body is used to identify a sender and can be usedto verify that sender's right to send the message to the specifiedendpoint and other associated capabilities of the sender. The credentialis an opaque token that must be presented each time a message is sent.The sending address placed in the message envelope may be crosscheckedwith the sender's identity in the credential. In one embodiment, eachcredential's implementation may be specified as a plug-in configuration,which allows multiple authentication configurations to co-exist on thesame network.

In one embodiment, messages may include, at a minimum, a peer groupcredential that identifies the sender of the message as a full memberpeer in the peer group in good standing. Membership credentials may beused that define a member's rights, privileges and role within the peergroup. Content access and sharing credentials may also be used thatdefine a member's rights to the content stored within the group.

In one embodiment, the peer-to-peer platform may provide differentlevels of security. In one embodiment, APIs may be provided to accesswell known security mechanisms such as RCA. In one embodiment, thepeer-to-peer platform may provide a distributed security mechanism in apeer-to-peer environment. In one embodiment, this distributed securitymay not depend on certificates administered by a central authority. Thedistributed security mechanism may allow a peer group “web of trust” tobe generated. In the distributed security mechanism, peers may serve ascertificate authorities (security peers). Each peer group may includeone or more peers that may serve as a certificate authority in thegroup. In one embodiment, the creator of a peer group may become thedefault security authority in the group. In one embodiment, if there ismore than one creator, the creator peers may choose one of the peers tobe the security authority in the group. In one embodiment, the peer orpeers that create a peer group may define the security methods that areto be used within the group (anywhere from no security to high levels ofsecurity). In one embodiment, more than one peer in a peer group mayserve as a security peer. Since peers are not guaranteed to be up at alltimes, having multiple security peers in a peer group may help insurethat at least one security peer is available at all times. In oneembodiment, the peer group's certificate peer may verify keys to providea weak level of trust. In one embodiment, peer-to-peer platformadvertisements may include information to describe the securitymechanism(s) to be used in a peer group. For example, the advertisementmay include information to do public key exchange, information toindicate what algorithms are to be used, etc. The advertisement may alsoinclude information that may be used to enforce secure informationexchange on pipes (e.g. encryption information).

In one embodiment, peer group security may establish a “socialcontract”. The role of security is distributed across peer groups, andacross members of peer groups, that all agree to participate by therules. A peer group may establish the set of rules by which security inthe group is enforced. A peer may join the peer group with a low levelof security clearance (low trust). If the peer stays in the group andbehaves (follows the rules), the peer may build up its level of trustwithin the group, and may eventually be moved up in its security level.Within peer groups operating under a social contract, certificatesand/or public keys may be exchanged without the participation of astrict certificate authority; i.e. the members may exchange certificatesbased upon their trust in each other. In one embodiment, a peer groupmay use an outside challenge (e.g. a secret group password) that may beencrypted/decrypted with public/private keys, as a method to protect andverify messages within the group. In one embodiment, peer groups may beconfigured to use other types of security, including a high level ofsecurity, for example using a strict certificate authority, and even nosecurity. In one embodiment, peer-to-peer platform messages exchangedwithin a group may have a “placeholder” for security credentials. Thisplaceholder may be used for different types of credentials, dependingupon the security implementation of the particular group. In oneembodiment, all peer-to-peer messages within the group may be requiredto have the embedded credential. One embodiment may support privatesecure pipes.

Peer-to-Peer Platform Firewalls and Security

The peer-to-peer platform may provide one or more methods for traversingfirewalls. FIG. 20 illustrates traversing a firewall 248 in a virtualprivate network when access is initiated from outside only according toone embodiment. Peers 200 on either side of the firewall 248 may eachbelong to one or more peer groups. In one embodiment, entry may berestricted to peers 200 with access privileges. In this example, peers200A and 200B have access privileges, but peer 200C does not. Thus,peers 200A and 200B may access peers 200D and 200E through firewall 248.In one embodiment, HTTP “tunnels” may be used, with proxies 246 in the“DMZ” of the firewall 248.

FIG. 21 illustrates email exchange through a firewall 248 via an emailgateway 260 according to one embodiment. In this example, peers 200A and200B outside the firewall 248 may exchange messages to peers 200C and200D via the email gateway 260. In one embodiment, there may be an SMTP(Simple Mail Transfer Protocol) service 262 on each peer 200. In oneembodiment, 100% peer-to-peer access may not be guaranteed. In oneembodiment, inside the firewall 248, mail account administration mayimpose restrictions. In one embodiment, email addresses may not berequired for all peers 200 outside of the firewall 248.

FIG. 22 illustrates several methods of traversing a firewall 248 whenaccess is initiated from the inside according to one embodiment. One ormore peers 200 may be inside the firewall 248, and one or more peers 200may be outside the firewall 248. In one embodiment, each peer 200 thatneeds to traverse firewall 248 may include a mini-HTTP server. In thisembodiment, an HTTP proxy may be used to provide peer-to-peer HTTPtunnels 264 through firewall 248. In one embodiment, Secure Shell (SSH)tunnels 266 may be used to traverse firewall 248. One embodiment maysupport SOCKS connections 268 if SOCKS is supported in the firewall 248.SOCKS is typically used to telnet/ftp to the “outside.” Otherembodiments may include other methods of traversing firewalls.

In one embodiment, peer-to-peer platform core protocols may be used forfirewall traversal. In one embodiment, the impact on the peer-to-peerprotocol core may be minimized in the traversal method. In oneembodiment, peers may use the “pure” core protocols for traversalwhenever possible. In embodiments where the core protocols need to beextended for traversal, a “divide and conquer” technique may be used. Ina divide and conquer technique, any new configurations (policies) may beisolated behind the firewall. A proxy or proxies may then be used tomediate with and bridge to the core protocols. In one embodiment, peerson either side of the firewall may initiate peer group contact with fullpeer-to-peer protocol implementation including, but not limited to, theability to initiate peer group discovery, the ability to join/leave peergroups, and the ability to create end-to-end pipes (cipher text dataexchange when required).

FIG. 23 illustrates one embodiment of a peer-to-peer platform proxyservice 270, and shows various aspects of the operation of the proxyservice. One or more peers 200 may be inside a firewall 248, and one ormore peers 200 may be outside the firewall 248. Peer-to-peer platformproxy service 270 is also shown outside the firewall 248. Proxy service270 may be used to enable peer 200 and peer group contact acrossfirewall 248. Firewall 248 may include an email gateway 260. In oneembodiment, the proxy service 270 may be used to bridge peer-to-peerplatform protocols 272 with HTTP 274, email 276 and/or SOCKS 278. Theproxy service 270 may allow peers 200 to send requests to communicateacross firewall 248. Through the proxy service 270, peer-to-peerplatform messages may be posted for delivery across the firewall 248. Inone embodiment, the proxy service 270 may allow secure pipes to beestablished across the firewall 248 as necessary.

FIG. 24 illustrates a method of using a proxy service for peer groupregistration according to one embodiment. The proxy service may permitfirewall-independent peer group membership. Three peer regions 212 areshown, with two (region 212A and 212B) on one side of firewall 248 andone (region 212C) on the other side of firewall 248. A peer group 210may be established that extends across the firewall 248 into regions212A, 212B and 212C. One or more peers 200 in each region 212 may bemembers of the peer group 210.

FIG. 25 illustrates peer group registration across a firewall accordingto one embodiment. Peer region 212A is shown outside of a firewall 248and peer region 212B is behind the firewall 248. Peer region 212Aincludes a peer-to-peer platform proxy service 270 and several peers200. In one embodiment, a peer 200 may be serving as a proxy peer thatprovides the proxy service 270. Peer region 212B includes several peers200 behind the firewall 248. At some point, peer 200D in peer region212B may form a peer group 210. An advertisement for the peer group 210may be registered on the proxy service 270 in the region 212A. One ormore peers 200 in region 212A may be notified of the newly registeredpeer group 200 by the proxy service 270. In one embodiment, the proxyservice may also notify other known peer-to-peer platform proxy servicesin this or other regions 212, who in turn may notify other proxyservices, and so on. Peers 200 in region 212A may then apply formembership in peer group 200.

FIG. 26 illustrates a method of providing peer group membership througha peer-to-peer platform proxy service according to one embodiment. Peerregions 212A and 212B are shown outside of a firewall 248, and peerregion 212C is behind the firewall 248. The two peer group regions 212outside the firewall 248 each include a proxy service 270. At least oneof the peers (peer 200F, in this example) in region 212C behind thefirewall belongs to a peer group 210. The peer group 210 may beregistered with the proxy services 270 in the regions 212A and 212Boutside the firewall 248. A peer 200 in either of the regions outsidethe firewall may join the peer group 200 by proxy through the proxyservice 270 in its region 212. Peers 200 in the regions 212 outside thefirewall 248 that are members of the peer group 210 may also leave thepeer group 210 through the proxy service 270. Membership information(e.g. included in peer group advertisements) for the peer group 200 maybe synchronized on all known proxy services 270 outside the firewall248. In one embodiment, a proxy service 270 may be a member peer of alllocally registered peer groups 200.

Several levels of authentication may be provided in one or moreembodiments of the peer-to-peer platform. Anonymous login may beprovided in one embodiment. In one embodiment, a plain text login (useror user and password) may be provided. In one embodiment, login withprivacy may be provided. In this embodiment, public key exchange may beused and/or a symmetric master key. In one embodiment, the login processmay return a credential to the joining peer so that the peer may bypassthe login process until the credential expires. One embodiment mayprovide a public key chain that may be used by registered users toeliminate public key exchanges and thus provides unauthenticated access.On embodiment may provide secure public key exchange with signedcertificates.

FIGS. 27A and 27B illustrate a method of providing privacy in thepeer-to-peer platform according to one embodiment. FIG. 27A shows a peerregion 212 with peers 200A and 200B and a peer-to-peer platform proxyservice 270. Peers 200A and 200B may fetch and cache public keys from apublic key chain 280 of the proxy service 270. The cached public keysmay have expiration dates. Peers 200A and/or 200B may compute a mastersecret key for one or more of the public keys. Using the keys, ciphertext may be exchanged between peers 200A and 200B in privacy asillustrated in FIG. 27B.

The peer-to-peer platform may include one or more methods for providingdata integrity in the peer-to-peer environment. These methods may beused to insure that what is sent is what is received. One embodiment mayuse a standard hash on data (e.g. Secure Hash Algorithm (SHA-1) asdefined by the Secure Hash Standard of the Federal InformationProcessing Standards Publication 180-1). A weak form and/or a strongform may be used in embodiments. In one embodiment, the weak form mayuse a public key ring and symmetric master to sign data. This method maywork best between two peers each having the other's public key. In oneembodiment, the strong form may use a symmetric key algorithm such asRSA (Rivest-Shamir-Adleman) and certificate authorities. In oneembodiment, the peer-to-peer platform may provide a proxy publiccertificate authority service. The authority service may create, signand distribute certificates (e.g. X509 certificates) for all peers on apublic key chain. In one embodiment, the proxy service's public key maybe resident on each proxied peer. Other embodiments may utilize otherintegrity methods.

FIGS. 28A and 28B illustrate one embodiment of a method for using apeer-to-peer platform proxy service as a certificate authority. FIG. 28Aillustrates a peer region 212 with several peers 200 and a proxy service270. The proxy service 270 may distribute signed certificates inresponse to peer requests as required. The peers 200 may validate theproxy service 270 signature using a proxy service public key. Asillustrated in FIG. 28B, when exchanging content with other peers 200, apeer 200 may sign the content with the destination peer's public key anddistribute the cipher text.

Peer Monitoring and Metering

Peer monitoring may include the capability to closely keep track of a(local or remote) peer's status, to control the behavior of a peer, andto respond to actions on the part of a peer. These capabilities may beuseful, for example, when a peer network wants to offer premium serviceswith a number of desirable properties such as reliability, scalability,and guaranteed response time. For example, a failure in the peer systemmay be detected as soon as possible so that corrective actions can betaken. In one embodiment, an erratic peer may be shut down and itsresponsibilities transferred to another peer. Peer metering may includethe capability to accurately account for a peer's activities, inparticular its usage of valuable resources. Such a capability isessential if the network economy is to go beyond flat-rate services.Even for providers offering flat rate services, it is to their advantageto be able to collect data and analyze usage patterns in order to beconvinced that a flat rate structure is sustainable and profitable. Inone embodiment, the peer-to-peer platform may provide monitoring andmetering through the peer information protocol, where a peer can queryanother peer for data such as up time and amount of data handled.Security is important in peer monitoring and metering. In oneembodiment, a peer may choose to authenticate any command it receives.In one embodiment, a peer may decide to not answer queries from suspectsources.

CONCLUSION

Various embodiments may further include receiving, sending or storinginstructions and/or data implemented in accordance with the foregoingdescription upon a carrier medium. Generally speaking, a carrier mediummay include storage media or memory media such as magnetic or opticalmedia, e.g., disk or CD-ROM, volatile or non-volatile media such as RAM(e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, etc. as well astransmission media or signals such as electrical, electromagnetic, ordigital signals, conveyed via a communication medium such as networkand/or a wireless link.

The various methods as illustrated in the Figures and described hereinrepresent exemplary embodiments of methods. The methods may beimplemented in software, hardware, or a combination thereof. The orderof method may be changed, and various elements may be added, reordered,combined, omitted, modified, etc.

Various modifications and changes may be made as would be obvious to aperson skilled in the art having the benefit of this disclosure. It isintended that the invention embrace all such modifications and changesand, accordingly, the above description to be regarded in anillustrative rather than a restrictive sense.

1. A peer-to-peer network system, comprising: a plurality of peer nodes;an initiating peer node configured to launch a mobile agent in thepeer-to-peer network, wherein the mobile agent includes an itineraryindicating a subset of the plurality of peer nodes to be visited by themobile agent, wherein the initiating peer node and the subset of theplurality of peer nodes are member peer nodes in a group of peer nodesin the peer-to-peer network; wherein the mobile agent is configured tovisit one or more of the subset of the plurality of peer nodes indicatedby the itinerary and to provide indications of the one or more visitedpeer nodes to the initiating peer node; wherein the initiating peer nodeis further configured to update presence information indicating presenceof member peer nodes in the group of peer nodes in accordance with theindications of the one or more visited peer nodes provided by the mobileagent; and wherein each of the subset of the plurality of peer nodesindicated by the itinerary is configured to: receive the mobile agentfrom a previous peer node; store an indication that the mobile agent hasvisited the peer node in a payload of the mobile agent; and send themobile agent to a next peer node indicated by the itinerary.
 2. Thepeer-to-peer network system as recited in claim 1, wherein, to updatepresence information indicating presence of member peer nodes in thegroup of peer nodes in accordance with the indications of the one ormore visited peer nodes provided by the mobile agent, the initiatingpeer node is further configured to indicate in the presence informationthat one or more of the peer nodes indicated by the itinerary and notvisited by the mobile agent are not present in the group of peer nodes.3. The peer-to-peer network system as recited in claim 1, wherein, toupdate presence information indicating presence of member peer nodes inthe group of peer nodes in accordance with the indications of the one ormore visited peer nodes provided by the mobile agent, the initiatingpeer node is further configured to remove from the presence informationindications that one or more of the subset of the plurality of peernodes not visited by the mobile agent are present in the group of peernodes.
 4. The peer-to-peer network system as recited in claim 1,wherein, to provide indications of the one or more visited peer nodes tothe initiating peer node, the mobile agent is further configured to:store the indications of the one or more visited peer nodes as a payloadof the mobile agent; and return the payload to the initiating peer nodeafter visiting the one or more of the subset of the plurality of peernodes indicated by the itinerary.
 5. The peer-to-peer network system asrecited in claim 1, wherein, to launch a mobile agent in thepeer-to-peer network, the initiating peer node is further configured tosend the mobile agent to a first peer node indicated by the itinerary.6. The peer-to-peer network system as recited in claim 1, wherein theprevious peer node is the initiating peer node.
 7. The peer-to-peernetwork system as recited in claim 1, wherein the next peer node is theinitiating peer node.
 8. The peer-to-peer network system as recited inclaim 1, wherein, to launch a mobile agent in the peer-to-peer network,the initiating peer node is further configured to: determine a firstpeer node indicated by the itinerary that is available to receive themobile agent; and send the mobile agent to the first peer node.
 9. Thepeer-to-peer network system as recited in claim 1, wherein each of thesubset of the plurality of peer nodes indicated by the itinerary isconfigured to: receive the mobile agent; select a target peer node thatis available to receive the mobile agent from unvisited peer nodes inthe subset of the plurality of peer nodes indicated by the itinerary;and send the mobile agent to the target peer node.
 10. The peer-to-peernetwork system as recited in claim 9, wherein each of the subset of theplurality of peer nodes indicated by the itinerary is further configuredto, if the mobile agent has completed the itinerary, return the mobileagent to the initiating peer node.
 11. The peer-to-peer network systemas recited in claim 1, wherein the initiating peer node is furtherconfigured to generate the itinerary from the presence information. 12.The peer-to-peer network system as recited in claim 1, wherein peernodes on the network are configured to implement a peer-to-peerenvironment according to a peer-to-peer platform comprising one or morepeer-to-peer platform protocols for enabling the peer nodes to discovereach other, communicate with each other, form groups of peer nodes, andsend and receive mobile agents in the peer-to-peer environment.
 13. Apeer node, comprising: a processor; a memory comprising programinstructions, wherein the program instructions are executable by theprocessor to: launch a mobile agent in the peer-to-peer network, whereinthe mobile agent includes an itinerary indicating a plurality of peernodes to be visited by the mobile agent, wherein the peer node and theplurality of peer nodes are member peer nodes in a group of peer nodesin the peer-to-peer network; wherein the mobile agent is configured tovisit one or more of the plurality of peer nodes indicated by theitinerary and to provide indications of the one or more visited peernodes to the peer node; and update presence information indicatingpresence of member peer nodes in the group of peer nodes in accordancewith the indications of the one or more visited peer nodes provided bythe mobile agent; wherein, to update presence information indicatingpresence of member peer nodes in the group of peer nodes in accordancewith the indications of the one or more visited peer nodes provided bythe mobile agent, the program instructions are further executable by theprocessor to indicate in the presence information that one or more ofthe peer nodes indicated by the itinerary and not visited by the mobileagent are not present in the group of peer nodes.
 14. The peer node asrecited in claim 13, wherein, to update presence information indicatingpresence of member peer nodes in the group of peer nodes in accordancewith the indications of the one or more visited peer nodes provided bythe mobile agent, the program instructions are further executable by theprocessor to remove from the presence information indications that oneor more of the plurality of peer nodes not visited by the mobile agentare present in the group of peer nodes.
 15. The peer node as recited inclaim 13, wherein, to provide indications of the one or more visitedpeer nodes to the peer node, the mobile agent is further configured to:store the indications of the one or more visited peer nodes as a payloadof the mobile agent; and return the payload to the peer node aftervisiting the one or more of the plurality of peer nodes indicated by theitinerary.
 16. The peer node as recited in claim 13, wherein, to launcha mobile agent in the peer-to-peer network, the program instructions arefurther executable by the processor to send the mobile agent to a firstpeer node indicated by the itinerary.
 17. The peer node as recited inclaim 13, wherein, to launch a mobile agent in the peer-to-peer network,the program instructions are further executable by the processor to:determine a first peer node indicated by the itinerary that is availableto receive the mobile agent; and send the mobile agent to the first peernode.
 18. The peer node as recited in claim 13, wherein the programinstructions are further executable by the processor to generate theitinerary from the presence information.
 19. The peer node as recited inclaim 13, wherein the peer node is configured to participate in apeer-to-peer environment with other peer nodes according to apeer-to-peer platform comprising one or more peer-to-peer platformprotocols for enabling the peer nodes to discover each other,communicate with each other, form groups of peer nodes, and send andreceive mobile agents to and from other peer nodes in the peer-to-peerenvironment.
 20. A method, comprising: an initiating peer node in apeer-to-peer network launching a mobile agent in the peer-to-peernetwork, wherein the mobile agent includes an itinerary indicating aplurality of peer nodes in the peer-to-peer network to be visited by themobile agent, the initiating peer node generating the itinerary frompresence information, wherein the initiating peer node and the pluralityof peer nodes are member peer nodes in a group of peer nodes in thepeer-to-peer network; the mobile agent visiting one or more of theplurality of peer nodes indicated by the itinerary; the mobile agentproviding indications of the one or more visited peer nodes to theinitiating peer node; and the initiating peer node updating the presenceinformation indicating presence of member peer nodes in the group ofpeer nodes in accordance with the indications of the one or more visitedpeer nodes provided by the mobile agent.
 21. The method as recited inclaim 20, wherein the initiating peer node updating presence informationindicating presence of member peer nodes in the group of peer nodes inaccordance with the indications of the one or more visited peer nodesprovided by the mobile agent comprises indicating in the presenceinformation that one or more of the plurality of peer nodes not visitedby the mobile agent are not present in the group of peer nodes.
 22. Themethod as recited in claim 20, wherein the initiating peer node updatingpresence information indicating presence of member peer nodes in thegroup of peer nodes in accordance with the indications of the one ormore visited peer nodes provided by the mobile agent comprises removingfrom the presence information indications that one or more of theplurality of peer nodes not visited by the mobile agent are present inthe group of peer nodes.
 23. The method as recited in claim 20, whereinthe mobile agent providing indications of the one or more visited peernodes to the initiating peer node comprises: the mobile agent storingthe indications of the one or more visited peer nodes as a payload ofthe mobile agent; and the mobile agent returning the payload to theinitiating peer node after visiting the one or more of the plurality ofpeer nodes indicated by the itinerary.
 24. The method as recited inclaim 20, wherein an initiating peer node in a peer-to-peer networklaunching a mobile agent in the peer-to-peer network comprises theinitiating peer node sending the mobile agent to a first peer nodeindicated by the itinerary.
 25. The method as recited in claim 20,wherein the mobile agent visiting one or more of the plurality of peernodes indicated by the itinerary comprises: one of the plurality of peernodes indicated by the itinerary receiving the mobile agent from aprevious peer node; storing an indication of the one of the plurality ofpeer nodes in a payload of the mobile agent; and the one of theplurality of peer nodes sending the mobile agent to a next peer nodeindicated by the itinerary.
 26. The method as recited in claim 25,wherein the previous peer node is the initiating peer node.
 27. Themethod as recited in claim 25, wherein the next peer node is theinitiating peer node.
 28. The method as recited in claim 25, furthercomprising repeating said receiving, said storing, and said sending themobile agent to a next peer node indicated by the itinerary until theitinerary is completed.
 29. The method as recited in claim 20, whereinan initiating peer node in a peer-to-peer network launching a mobileagent in the peer-to-peer network comprises: the initiating peer nodedetermining a first peer node indicated by the itinerary that isavailable to receive the mobile agent; and the initiating peer nodesending the mobile agent to the first peer node.
 30. The method asrecited in claim 20, wherein the mobile agent visiting one or more ofthe plurality of peer nodes indicated by the itinerary comprises: one ofthe plurality of peer nodes indicated by the itinerary receiving themobile agent; selecting a next peer node indicated by the itinerary as atarget peer node; determining if the target peer node is available toreceive the mobile agent; if the target peer node is not available toreceive the mobile agent: selecting a subsequent peer node as the targetpeer node; and repeating said determining if the target peer node isavailable to receive the mobile agent and said selecting a subsequentpeer node as the target peer node until either determining the targetpeer node is available to receive the mobile agent or the itinerary isexhausted.
 31. The method as recited in claim 30, wherein the mobileagent visiting one or more of the plurality of peer nodes indicated bythe itinerary comprises, if the target peer node is available to receivethe mobile agent, sending the mobile agent to the target peer node. 32.The method as recited in claim 30, wherein the mobile agent visiting oneor more of the plurality of peer nodes indicated by the itinerarycomprises, if the itinerary is exhausted, returning the mobile agent tothe initiating peer node.
 33. The method as recited in claim 20, whereinpeer nodes in the peer-to-peer network are configured to implement apeer-to-peer environment according to a peer-to-peer platform comprisingone or more peer-to-peer platform protocols for enabling the peer nodesto discover each other, communicate with each other, form groups of peernodes, and send and receive mobile agents in the peer-to-peerenvironment.
 34. A computer-accessible storage medium comprising programinstructions, wherein the program instructions are configured toimplement: an initiating peer node in a peer-to-peer network launching amobile agent in the peer-to-peer network, wherein the mobile agentincludes an itinerary indicating a plurality of peer nodes in thepeer-to-peer network to be visited by the mobile agent, wherein theinitiating peer node and the plurality of peer nodes are member peernodes in a group of peer nodes in the peer-to-peer network; the mobileagent visiting one or more of the plurality of peer nodes indicated bythe itinerary; the mobile agent providing indications of the one or morevisited peer nodes to the initiating peer node; and the initiating peernode updating presence information indicating presence of member peernodes in the group of peer nodes in accordance with the indications ofthe one or more visited peer nodes provided by the mobile agent,wherein, in the initiating peer node updating presence informationindicating presence of member peer nodes in the group of peer nodes inaccordance with the indications of the one or more visited peer nodesprovided by the mobile agent, the program instructions are furtherconfigured to implement indicating in the presence information that oneor more of the plurality of peer nodes not visited by the mobile agentare not present in the group of peer nodes.
 35. The computer-accessiblestorage medium as recited in claim 34, wherein, in the initiating peernode updating presence information indicating presence of member peernodes in the group of peer nodes in accordance with the indications ofthe one or more visited peer nodes provided by the mobile agent, theprogram instructions are further configured to implement removing fromthe presence information indications that one or more of the pluralityof peer nodes not visited by the mobile agent are present in the groupof peer nodes.
 36. The computer-accessible storage medium as recited inclaim 34, wherein, in the mobile agent providing indications of the oneor more visited peer nodes to the initiating peer node, the programinstructions are further configured to implement: the mobile agentstoring the indications of the one or more visited peer nodes as apayload of the mobile agent; and the mobile agent returning the payloadto the initiating peer node after visiting the one or more of theplurality of peer nodes indicated by the itinerary.
 37. Thecomputer-accessible storage medium as recited in claim 34, wherein, inan initiating peer node in a peer-to-peer network launching a mobileagent in the peer-to-peer network, the program instructions are furtherconfigured to implement the initiating peer node sending the mobileagent to a first peer node indicated by the itinerary.
 38. Thecomputer-accessible storage medium as recited in claim 34, wherein, inthe mobile agent visiting one or more of the plurality of peer nodesindicated by the itinerary, the program instructions are furtherconfigured to implement: one of the plurality of peer nodes indicated bythe itinerary receiving the mobile agent from a previous peer node;storing an indication of the one of the plurality of peer nodes in apayload of the mobile agent; and the one of the plurality of peer nodessending the mobile agent to a next peer node indicated by the itinerary.39. The computer-accessible storage medium as recited in claim 38,wherein the previous peer node is the initiating peer node.
 40. Thecomputer-accessible storage medium as recited in claim 38, wherein thenext peer node is the initiating peer node.
 41. The computer-accessiblestorage medium as recited in claim 38, wherein the program instructionsare further configured to implement repeating said receiving, saidstoring, and said sending the mobile agent to a next peer node indicatedby the itinerary until the itinerary is completed.
 42. Thecomputer-accessible storage medium as recited in claim 34, wherein, inan initiating peer node in a peer-to-peer network launching a mobileagent in the peer-to-peer network, the program instructions are furtherconfigured to implement: the initiating peer node determining a firstpeer node indicated by the itinerary that is available to receive themobile agent; and the initiating peer node sending the mobile agent tothe first peer node.
 43. The computer-accessible storage medium asrecited in claim 34, wherein, in the mobile agent visiting one or moreof the plurality of peer nodes indicated by the itinerary, the programinstructions are further configured to implement: one of the pluralityof peer nodes indicated by the itinerary receiving the mobile agent;selecting a next peer node indicated by the itinerary as a target peernode; determining if the target peer node is available to receive themobile agent; if the target peer node is not available to receive themobile agent: selecting a subsequent peer node as the target peer node;and repeating said determining if the target peer node is available toreceive the mobile agent and said selecting a subsequent peer node asthe target peer node until either determining the target peer node isavailable to receive the mobile agent or the itinerary is exhausted. 44.The computer-accessible storage medium as recited in claim 43, wherein,in the mobile agent visiting one or more of the plurality of peer nodesindicated by the itinerary, the program instructions are furtherconfigured to implement, if the target peer node is available to receivethe mobile agent, sending the mobile agent to the target peer node. 45.The computer-accessible storage medium as recited in claim 43, whereinthe mobile agent visiting one or more of the plurality of peer nodesindicated by the itinerary comprises, if the itinerary is exhausted,returning the mobile agent to the initiating peer node.
 46. Thecomputer-accessible storage medium as recited in claim 34, wherein theprogram instructions are further configured to implement the initiatingpeer node generating the itinerary from the presence information. 47.The computer-accessible storage medium as recited in claim 34, whereinpeer nodes in the peer-to-peer network are configured to implement apeer-to-peer environment according to a peer-to-peer platform comprisingone or more peer-to-peer platform protocols for enabling the peer nodesto discover each other, communicate with each other, form groups of peernodes, and send and receive mobile agents in the peer-to-peerenvironment.